0

使用上述库,我可以获取用户的详细信息,他的授权,他的朋友,但只有一次:我需要将 access_token 和密钥存储在数据库中,以便用户可以访问他的朋友墙或其他公共详细信息。任何人都可以帮忙吗?(我在 Twitter 和 Tumblr 上使用过 OAuth,但我无法在 FB 上使用它)。

4

2 回答 2

1

https://developers.facebook.com/docs/authentication/

保存令牌时要小心。当不请求所有时间许可时,它会在特定时间过期(可能是您的问题)

使用画布应用(集成在 apps.facebook.com 中的应用)时,请求另一个令牌非常简单。每当用户访问它时,Facebook 都会向您的应用程序发布一个 signed_request 参数 (https://developers.facebook.com/docs/authentication/signed_request/)。

对其进行解码,将其传递给 Graph API,然后获利。

于 2011-11-03T10:51:20.813 回答
0

if you need a generic access_token without a login... you can use $appID ."|". $secKey this is called a APP access token, so it would be logged in as the "Application" not a user

!!! make sure you use this on https://graph.facebook.com/ !!!

hints the "https://" for secure SSL connection but the API already determines this.

于 2012-02-12T01:15:54.193 回答