ios - Facebook Inbox with Fql -
I will show the name and image of another participant in TableView , such as Facebook Inbox I'm using this fql query to get me
- (zero) readInbox {NSString * query = [NSString stringWithFormat: @ "Select recipients, thread_id from unified_message where thread_id IN (SELECT thread_ID FROM unified_thread where folder = 'inbox')"]; NSMutableDictionary * params = [Object EndCase with NSMutableDictionary dictionary: query, @ "q", zero]; FBSEEEST * Request = [FBCAC Request Request: @ "/ FQL" parameter: Paramas HTTPMethod: @ "GET"]; [Request Started End Handler: ^ (FBCACC Connection * Connection, ID Result, NSERR * Error) {NSLog (@ "Result:% @", Results); }]; } And the result is something like this
data = ({recipient = ({email = "****@facebook.com"; name = "*****"; "user_id" = 6 * * *;}, {email = "****@facebook.com"; name = "******"; // it is me "User_id" = * * *;;); "thread_id" = "t_mid.1371470061934: 11B440F1722F8FC977";}, to show this What is correct?
How do I get all the other participants using FQL?
You can parse the JSON data using the FQL query and call it In the Mutable Array , you can use the following query to get the name . And the user's id .
Choose the name from the user name, from UID to the user (Select from author_id message where in thread_id (choose folder_id from thread thread with thread) = 0))
You will now be the first index. If you want, remove it from the array.
Comments
Post a Comment