iosfacebookfacebook-checkins

facebook ios sdk automatically select place when checking in?


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!


Solution

  • 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...