我發現文中的非常好的,引進一套擴展權限需要 如何設置擴展權限?
(https://developers.facebook.com/docs/beta/authentication/#referrals)
,但我去認證對話框的設置,本場所需的權限替換用戶&朋友的權限。我看不到域需要的權限。請幫幫我。感謝
我發現文中的非常好的,引進一套擴展權限需要 如何設置擴展權限?
(https://developers.facebook.com/docs/beta/authentication/#referrals)
,但我去認證對話框的設置,本場所需的權限替換用戶&朋友的權限。我看不到域需要的權限。請幫幫我。感謝
您可以通過設置您的呼叫需要顯示的登錄/授權屏幕擴展權限。
對於Javascript SDK,它是FB.login(回調,範圍)的第二個參數。
對於登錄社交插件,它是範圍屬性。
對於PHP SDK這將是
$params = array(
scope => 'read_stream, friends_likes',
redirect_uri => 'https://www.myapp.com/post_login_page'
);
$loginUrl = $facebook->getLoginUrl($params);
每http://developers.facebook.com/docs/reference/api/permissions/擴展權限是:
read_friendlists Provides access to any friend lists the user created. All user's friends are provided as part of basic data, this extended permission grants access to the lists of friends a user has created, and should only be requested if your application utilizes lists of friends.
read_insights Provides read access to the Insights data for pages, applications, and domains the user owns.
read_mailbox Provides the ability to read from a user's Facebook Inbox.
read_requests Provides read access to the user's friend requests
read_stream Provides access to all the posts in the user's News Feed and enables your application to perform searches against the user's News Feed
xmpp_login Provides applications that integrate with Facebook Chat the ability to log in users.
ads_management Provides the ability to manage ads and call the Facebook Ads API on behalf of a user.
create_event Enables your application to create and modify events on the user's behalf
manage_friendlists Enables your app to create and edit the user's friend lists.
manage_notifications Enables your app to read notifications and mark them as read. This permission will be required to all access to notifications after October 22, 2011.
offline_access Enables your app to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application. This permission makes the access token returned by our OAuth endpoint long-lived.
publish_checkins Enables your app to perform checkins on behalf of the user.
publish_stream Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends. With this permission, you can publish content to a user's feed at any time, without requiring offline_access. However, please note that Facebook recommends a user-initiated sharing model.
rsvp_event Enables your application to RSVP to events on the user's behalf
sms Enables your application to send messages to the user and respond to messages from the user via text message
publish_actions Enables your application to publish user scores and achievements.
我不認爲你可以要求通過對話擴展權限,或使用SDK如上所述。
在以前版本的PHP SDK中,如果用戶不批准所有請求的權限,則oauth對話框將返回錯誤 - 這不再是這種情況。只要用戶批准基本權限,就可以取消選擇任何請求的擴展權限,並且用戶將被重定向而不會出現警告或錯誤。我希望我錯了,但是通過閱讀文檔和我自己的測試,我不認爲我是。
從您引用文檔的同一頁:在第二https://developers.facebook.com/docs/beta/authentication/
「更新後的身份驗證對話框將顯示第一對話的一組用戶和朋友的權限,以及其他擴展權限(如果有的話)對話屏幕,用戶和朋友的權限是不可撤銷的,而通過在第二個對話框屏幕上點擊每個權限旁邊的「X」,可以撤銷擴展權限您的應用必須準備好處理每個場景(授予權限,撤銷)「
如果您的應用需要特定的權限,您的代碼必須確保用戶授予它。
帶有「範圍」參數的提示幫助了我,thx – 2013-08-23 14:12:59