开发者

access graph api in multiple pages in a Facebook App

开发者 https://www.devze.com 2023-04-06 14:03 出处:网络
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?

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消