how to get messages in the inbox of facebook using fql query?

Tag: facebook Author: TYZHJ Date: 2009-08-18

When i request for inbox messages in fql.query using the below query.

SELECT message_count FROM thread WHERE folder_id = 0

It is giving this error.

yyyyyyyyyy is not permitted to requested mailbox permissions from xxxxxxxxx
Are you logged in as the user you are trying to get messages from?

Other Answer1

Ershad you will need to submit that query within a session where you have passed the API and SECRET of the application you're using to start, and then ensure that for whomever you're trying to query, that the application has access to their information via a clicked "grant permissions" dialog box.

Other Answer2

In addition to Alex Mcp's description of the requirement for read_mailbox extended permission http://wiki.developers.facebook.com/index.php/Extended_permissions

Did you notice the Notes on the Thread(FQL) page states -

*To get started, as a developer you can access the Inbox APIs via the read_mailbox permission in order to develop and test your application. To launch your application to all users, please apply to the Inbox API whitelist here. http://www.facebook.com/devhelp?category=Inbox*