如何从我的网站上的Facebook显示我的个人资料? [英] How can I show my personal stuff from Facebook in my website?
问题描述
我不明白他们是为什么我问。
我想要一些让我的网站登录到Facebook并显示我的状态或者照片给访客,而他们不需要接受一个应用程序或使用他们的帐户登录到Facebook。
我用我的AppID和AppSecret尝试了一个Facebook-php-sdk示例,它要求我登录。
另外,github.com/facebook没有类似于Facebook-php-sdk的Python的SDK
您可以使用长期访问令牌来获取您的FB数据,然后将数据存储在您的后端数据库(或您的网站的其他商店)中。对于Facebook,您的脚本将看起来像一个应用程序,您的机器将成为该应用程序的唯一用户。注意,长期访问令牌最多可达60天。您还可以尝试使用应用访问令牌获取基本信息。应用访问令牌不会过期。
I searched in Stack Overflow, Google, etc, but I can't figure out how to show my stuff from my Facebook on my website. I tried some solutions and each one prompted the login dialog and visitors had to log in and accept my application (I've created one to test).
Many answers here were too generic, I didn't understand them that is why I'm asking.
I want something that would let my website "log in" to Facebook and show my status or photos to visitors without them needing to accept an app or log in into Facebook with their account.
I tried a facebook-php-sdk example with my AppID and AppSecret and it asked me to log in. Also, github.com/facebook doesn't have an SDK for Python similar to facebook-php-sdk
You could write a script (eg. using the FB PHP SDK) that uses a long-lived access token to fetch your FB data and then store the data in your backend database (or other store for your website). To Facebook, your script will look like an app and your machine will be the only 'user' of that app. Note, long-lived access tokens are good for 60 days max. You could also try using an App Access Token to fetch basic info. App Access Tokens don't expire.
这篇关于如何从我的网站上的Facebook显示我的个人资料?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!