File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1717 * You should have received a copy of the GNU General Public License
1818 * along with phpSmug. If not, see <http://www.gnu.org/licenses/>.
1919 */
20- ?>
20+ if (session_id () == "" ) { @session_start (); }
21+ ?>
2122<html>
2223<head>
2324 <title>phpSmug OAuth Login Example</title>
5758 // Perform the 3 step OAuth Authorisation process.
5859 // NOTE: This is a very simplified example that does NOT store the final token.
5960 // You will need to ensure your application does.
60-
61- if ( session_id () == "" ) { @session_start (); }
62-
63- if ( ! $ _SESSION ['SmugGalReqToken ' ] ) {
61+ if ( ! isset ( $ _SESSION ['SmugGalReqToken ' ] ) ) {
6462 // Step 1: Get a Request Token
6563 $ d = $ f ->auth_getRequestToken ();
6664 $ _SESSION ['SmugGalReqToken ' ] = serialize ( $ d );
7573 session_unregister ( 'SmugGalReqToken ' );
7674
7775 // Step 3: Use the Request token obtained in step 1 to get an access token
78- $ f ->setToken ( "id= {$ reqToken ['id ' ]}" , "Secret= {$ reqToken ['Secret ' ]}" );
76+ $ f ->setToken ("id= {$ reqToken ['Token ' ][ ' id ' ]}" , "Secret= {$ reqToken ['Token ' ][ ' Secret ' ]}" );
7977 $ token = $ f ->auth_getAccessToken (); // The results of this call is what your application needs to store.
8078
8179 // Set the Access token for use by phpSmug.
You can’t perform that action at this time.
0 commit comments