如何从我的网站上的Facebook显示我的个人资料? [英] How can I show my personal stuff from Facebook in my website?

查看:151
本文介绍了如何从我的网站上的Facebook显示我的个人资料?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Stack Overflow,Google等搜索,但我无法弄清楚如何在我的网站上显示我的Facebook的东西。我尝试了一些解决方案,每个都提示登录对话框,访问者必须登录并接受我的应用程序(我已经创建了一个测试)。



我不明白他们是为什么我问。



我想要一些让我的网站登录到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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆