2012-05-11 34 views
0

我對facebook API比較陌生,但想知道如何讓用戶通過API或社交插件將頁面添加到「興趣列表」中?例如:通過Facebook API添加到興趣列表

<html> 
    <head> 
     <title>My Great Web page</title> 
    </head> 
    <body> 
     <iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL" 
     scrolling="no" frameborder="0" 
     style="border:none; width:450px; height:80px"></iframe> 
    </body> 
</html> 

是怎麼想的,我明白這是基本的,但任何事情,這樣我可以允許用戶將喜歡網頁添加到他們的興趣列表。

回答

1

API

您不能以利益連接。它在Graph API中不受支持。

您的應用程序可以檢索用戶與GET請求利益

graph.facebook.com/USER_ID/interests 

你需要的

user_interests 
friends_interests 

權限。

但是,您無法發佈到興趣連接。如果您嘗試,您會得到GraphMethodException「不支持的發佈請求」作爲回報。

社會插件

儘管如此Social Plug-ins已經張貼到利益爲特徵。