How to post to a friends Wall using Facebook Graph API for iPhone

前端 未结 3 896
忘掉有多难
忘掉有多难 2020-12-28 10:42

I want to post something in the users friends wall.

I use this to post into the user wall

SBJSON *jsonWriter = [[SBJSON new] autorelease];

    NSDi         


        
3条回答
  •  囚心锁ツ
    2020-12-28 11:32

    @mAc

    You have to authorize facebook first. Then you implement 'FBRequestDelegate' methods to your class. Then make a request with graph API as given below

    [facebook requestWithGraphPath:@"/me/friends" andDelegate:self];
    

    Once your request succeeded, api will call the delegate method 'requestDdidLoad',

    -(void)request:(FBRequest *)request didLoad:(id)result {
    
        NSLog(@"Result: %@", result);
    
    }
    

    Form the result you will get the frieds page ID

提交回复
热议问题