Getting basic facebook profile information ios -
i have logged in on ios app building using easier method of fbsdkloginbutton
.
since want users name , link facebook know can find under [fbsdkprofile currentprofile]
.
my question how use this?
i trying sorts of combinations akin below example of i'm doing.
[fbsdkprofile enableupdatesonaccesstokenchange:yes]; nsstring *name = [[nsstring alloc]init]; name = [[fbsdkprofile currentprofile]firstname];
i figure since app has access tested through if on [fbsdkaccesstoken currentaccesstoken]
believe primed. app delegate setup also. shouldn't above code work? mean, assume currentprofile
set if user logged in? maybe? arghhh!!!
thanks guys
try code :
fbrequesthandler completionblock = ^(fbrequestconnection *connection, nsdictionary<fbgraphuser> *user, nserror *error) { nslog(@"user dictionary : %@", user); }; [[fbrequest requestforme] startwithcompletionhandler:completionblock];
you can user details user dictionary.
Comments
Post a Comment