access graph api in multiple pages in a Facebook App
I am unable to access Graph Api in other pages other than the initial page load on my facebook app.
Any ways I can access the Access Token in other pages on my app? Cause t开发者_开发知识库he signed_request is available only at the index page
Anyone can help with it?
Facebook uses a $_SESSION to store all crucial information including Userid, Accesstoken etc.. Your index page obviously has a
require 'facebook.php';
Make sure you add the same line at the top of the next page. Immediately after that add a
start_session();
Now you can perform a
print_r($_SESSION);
and you will be able to see all important info that facebook has stored and you can use them. (Provided user is still logged in and token has not expired).
精彩评论