0

大家好,我正在尝试在墙上发布消息,但同时针对朋友。就像我们在墙上张贴一样@friendsname。我正在使用下面的代码

 NSMutableDictionary* params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                    @"post", @"type",
                                    urlQRCode, @"picture",
                                    [globals linktoapp], @"link",
                                    @"xsxsx", @"name",
                                    @"sxsxsxsxsx", @"caption",
                                    @"sxsxssx", @"description",
                                    messsdsage, @"message",
                                    @"friendfbuid", @"to",
                                    nil];



    [appDelegate.facebook requestWithGraphPath:@"me/feed"
                                     andParams:params1
                                 andHttpMethod:@"POST"
                                   andDelegate:self];
4

2 回答 2

1
+(SHKItem *)image:(UIImage *)image title:(NSString *)title;


UIImage *image = [UIImage imageNamed:@"sanFran.jpg"];
SHKItem *item = [SHKItem image:image title:@"Look at this picture!"];

阅读文档并下载共享工具包单击野兔.. http://getsharekit.com/docs/

于 2013-04-30T14:31:39.550 回答
0
- (void) postImageToFacebook {

appDelegate = (ScorecardAppDelegate *)[[UIApplication sharedApplication] delegate];

currentAPICall = kAPIGraphUserPhotosPost;

UIImage *imgSource = {insert your image here};
NSString *strMessage = @"This is the photo caption";
NSMutableDictionary* photosParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                     imgSource,@"source",
                                     strMessage,@"message",
                                     nil];

[appDelegate.facebook requestWithGraphPath:@"me/photos"
                                 andParams:photosParams
                             andHttpMethod:@"POST"
                               andDelegate:self];     

// after image is posted, get URL for image and then start feed dialog
// this is done from FBRequestDelegate method
}

尝试这个。它可能会帮助你。

于 2013-04-30T13:24:12.143 回答