"Access basic data of the logged user" | request | request := FBSDKGraphRequest withGraphPath: #me parameters: (#fields -> 'email, first_name, last_name, picture.type(large)'). request startWith: [:conn :result| self print: '// conn=',conn,' isNil=',conn isNil; print: '// result=',result,' isNil=',result isNil. result notNil ifTrue: [ self print: '// result tuples=',result tuples asLiteral ]. ] onError: [:nsError| self print: 'Error ',nsError ]
"Accessing the friends of the logged user" | request | request := FBSDKGraphRequest withGraphPath: #me parameters: (#fields -> 'friends{name,birthday,location}'). request startWith: [:conn :result| self print: '// conn=',conn,' isNil=',conn isNil; print: '// result=',result,' isNil=',result isNil. result notNil ifTrue: [ self print: '// result tuples=',result tuples asLiteral. result inspect ]. ] onError: [:nsError| self print: 'Error ',nsError ]
Note | Facebook has banned access to friends, so we canīt get the data with their SDK 2.0. Read more here |