FBSDKShareOpenGraphObject *object = [[FBSDKShareOpenGraphObject alloc]init];
[object setString:@"digital:milestone" forKey:@"og:type"];
[object setString:@"Title" forKey:@"og:title"];
[object setString:@"Description" forKey:@"og:description"];
if (self.photo) {
[object setPhoto:self.photo forKey:@"og:image"];
}
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"digital:celebrate";
[action setObject:object forKey:@"digital:milestone"];
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"digital:milestone";
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
shareDialog.delegate=self;
shareDialog.fromViewController = self;
shareDialog.shareContent = content;
[shareDialog show];
While using the above piece of code ,It take you to the Facebook app and shows the Share utility which shows only the Image.(The Title and Desc is not seen ),
Although when i press the post button ,the post is properly shared with image,title,desc.The issue is while sharing user is having no clue what he/she is sharing
Aucun commentaire:
Enregistrer un commentaire