[英]Posting message on my wall facebook ios sdk?
大家好,我正在嘗試在我的牆上張貼一條消息,但同時針對的是朋友。 就像我們在牆上@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];
+(SHKItem *)image:(UIImage *)image title:(NSString *)title;
UIImage *image = [UIImage imageNamed:@"sanFran.jpg"];
SHKItem *item = [SHKItem image:image title:@"Look at this picture!"];
閱讀Doc and Download Shared kit,然后單擊Hare。。http: //getsharekit.com/docs/
- (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
}
嘗試這個。 它可能會幫助您。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.