mercredi 6 mai 2015

iOS Facebook SDK v4.0 not showing Title and Description while sharing a Post containing (Image ,Title ,Desc)

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 sharingenter image description here

Aucun commentaire:

Enregistrer un commentaire