Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"The app must ask for a basic read permission at install time"

I am using the iOS Built in frameworks to connect. After asking for "publish_stream" permissions, FB returns an error:

Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The app must ask for a basic read permission at install time." UserInfo=0x145ad6a0 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The app must ask for a basic read permission at install time.}

What is going on here? Showing two user permission popups is a less than ideal user experience.

like image 948
coneybeare Avatar asked Sep 15 '12 23:09

coneybeare


2 Answers

The very first time, you must ask for read permissions. You cannot auth the user initially with any type of publish/write permissions. What you should do after that is, where it makes sense in your app, ask for publish_stream permission. Definitely do not do the initial permission and then immediately ask for the publish_stream permission.

See this note in https://developers.facebook.com/docs/tutorial/iossdk/upgrading-from-3.0-to-3.1/, section "Asking for Read & Write Permissions Separately". Even though this applies to the Facebook SDK for iOS it is an extension of the same requirement in the built-in framework.

like image 99
C Abernathy Avatar answered Oct 27 '22 08:10

C Abernathy


I would like to add that there is an additional caveat in the Facebook docs:

// if a user has *never* logged into your app, you MUST include one of
// "email", "user_location", or "user_birthday".  Other read 
// permissions can also be included here.

Failure to do this leads to the same error.

like image 44
shawkinaw Avatar answered Oct 27 '22 10:10

shawkinaw