سؤال

Hi I have quite a simple question thats been bugging me for a while. How can I automatically select the place that the user checks into when using the check in feature of the Facebook sdk for iOS. Rather then showing the placePicker with an array of places near the users location I would like to pre-select the place for the user.

I am assuming that there is some way to do this by using the id of the place but I can't work it out...

Any help would be greatly appreciated.

cheers!

هل كانت مفيدة؟

المحلول

Okay after much searching I found the answer to this question thanks to a very informative video that I found on the Facebook developer website.

here is the link to the video

and here is the code that I used:

id<FBGraphPlace> place = (id<FBGraphPlace>)[FBGraphObject graphObject];
[place setId:@"XXplaceidXX"];

Very simple. All you need is the facebook id of the place...

نصائح أخرى

Try This -

By using this FQL you will get pageId array and user info.Just pass required latitude and longitude.Here PageID means available pageIDs for checkin near to passed latitude and longitude.

NSString *query = [NSString stringWithFormat:@"{ 'place':'SELECT page_id FROM place WHERE distance(latitude, longitude, \"%@\", \"%@\") < 250',"
                   @"'friendsInfo':'SELECT uid, name, pic_square FROM user WHERE uid IN "
                   @"(SELECT uid2 FROM friend WHERE uid1 = me())',}",self.mistohLat,self.mistohLong];

So while checkin you just need to pass pageID from pageIDArray, no need to select location.In my case I always passed pageID from zeroth index. Let me know if it helps you.Thank you.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top