i want to share friend's post via graph api

2019-06-22 17:40发布

问题:

I want to share some posts in facebook via graph api.

But there's no api like this. only "feed" exists.

I tried to use "me/feed" graph api action to share my friend's post(and post in page). but it's not same as i shared in facebook website. i want to know how.

source is..

NSMutableDictionary *fbArguments = [[NSMutableDictionary alloc] init];
NSString *linkURL = @"http://media.daum.net/society/others/view.html?cateid=1067&newsid=20120106140112792&p=munhwa&RIGHT_COMM=R4";
[fbArguments setObject:linkURL  forKey:@"link"];
[facebook requestWithGraphPath:@"me/feed" 
             andParams:fbArguments
             andHttpMethod:@"POST"
               andDelegate:self];
[fbArguments release];

And I noticed there's no action for sharing friend's post(or photo), page's post via facebook iphone app. (so weird. don't you need this action?)

what can i do? can you help me?

Thanks.


i'v succeeded sharing photo. that is 'Link'.

source is

NSMutableDictionary *fbArguments = [[NSMutableDictionary alloc] init];
NSString *linkURL = @"https://www.facebook.com/photo.php?fbid=324225380935287&set=a.265279620163197.68309.194442110580282&type=1";
[fbArguments setObject:linkURL  forKey:@"link"];
[fbArguments setObject:@"good!"  forKey:@"message"];
[facebook requestWithGraphPath:@"me/feed" 
             andParams:fbArguments
             andHttpMethod:@"POST"
               andDelegate:self];
[fbArguments release];

i added message. and this is perfectly same as i shared via facebook web.

but there is one problem. this never makes back reference(trackback?).

if I share a photo via facebook web, I can see "5 shares" upper comment list, and my username is is there.

But this way, There is no my username. No trackback.

what can i do?

thanks.