如何在外部网站中访问Facebook粉丝页面照片
我们正试图利用facebook照片托管,允许我们的访客通过我们上传到粉丝墙上的网页查看照片 有人知道如何做到这一点吗 提前感谢!如何在外部网站中访问Facebook粉丝页面照片,facebook,Facebook,我们正试图利用facebook照片托管,允许我们的访客通过我们上传到粉丝墙上的网页查看照片 有人知道如何做到这一点吗 提前感谢! Steven。使用社交图,您可以执行此操作,前提是脚本具有facebook页面应用程序ID的访问令牌,或者您的照片权限设置为完全公开 使用社交图,您基本上可以通过类似REST的web服务访问照片。webservice调用将返回dataExample的JSON对象: https://graph.facebook.com/cocacola/albums (可口可乐粉丝页
Steven。使用社交图,您可以执行此操作,前提是脚本具有facebook页面应用程序ID的访问令牌,或者您的照片权限设置为完全公开
使用社交图,您基本上可以通过类似REST的web服务访问照片。webservice调用将返回dataExample的JSON对象:
https://graph.facebook.com/cocacola/albums
(可口可乐粉丝页相册)
因此,第一步是使用上面的URL检索相册。
遍历相册并获取所需相册的对象ID
{
"id": "455377148305",
"from": {
"name": "Coca-Cola",
"category": "Company",
"id": "40796308305"
},
"name": "Coca-Cola Fanmeile FIFA WM 2010",
"link": "http://www.facebook.com/album.php?aid=249745&id=40796308305",
"count": 20,
"type": "normal",
"created_time": "2010-10-22T15:53:36+0000",
"updated_time": "2010-10-22T15:55:23+0000",
"comments": {}
},
拥有对象ID后,只需将其作为图形URL的第一个参数即可访问该对象。例如:
https://graph.facebook.com/40796308305
从那里,您应该能够获取图像的实际URL(取决于权限设置)
这真是太棒了,有没有一种方法可以让我们的访问者对照片发表评论,然后评论也会出现在facebook上?
{
"id": "40796308305",
"name": "Coca-Cola",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs236.ash2/50516_40796308305_7651_s.jpg",
"link": "http://www.facebook.com/coca-cola",
"category": "Company",
"website": "http://www.coca-cola.com",
"username": "coca-cola",
"products": "Coca-Cola is the most popular and biggest-selling soft drink in history, as well as the best-known product in the world.\n\nCreated in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage by mixing Coca-Cola syrup with carbonated water. Coca-Cola was introduced in 1886, patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States.\n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.",
"likes": 22264613
}