开发者

Why is App Access Token different to AppID|Secret now?

开发者 https://www.devze.com 2023-04-01 22:32 出处:网络
In the facebook docs, it says we can specify: AppID|Secret As the application access_token However, when going to https://developers.facebook.com/tools/access_token/the App Token is different. This

In the facebook docs, it says we can specify:

AppID|Secret

As the application access_token

However, when going to https://developers.facebook.com/tools/access_token/ the App Token is different. This is in the form AppID|Randomnumber

Which should we be usin开发者_开发知识库g? The PHP SDK uses the 'Secret' version - do we need to adjust this?


The app token is not APP_ID|APP_SECRET. The FB docs says that the app token may be obtained using the APP_ID and the APP_SECRET. You can achieve this by hitting this URL:

https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials


AppID|AppSecret works and I use it outside of PHP. It is the only way to publish to a users stream after their access token expires and you haven't prompted for offline_access. The appId|randomnumber they show you on that page expire like regular access tokens where appid|appsecret do not expire.

0

精彩评论

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

关注公众号