Automatically tag place in facebook ShareDialod

155 views Asked by At

I have a problem with tagging place in share dialog. I am using this code

ShareFeedContent content = new ShareFeedContent.Builder()
    .setLink(text)
    .setPlaceId(id).build();
ShareDialog.show(context,content);

but setPlaceId(id) has no effect. I mean when the dialog opens the place is not tagged and I have to select it again

actual behaviour

I think that specifying place id should tag place automatically like this

exoected behaiour

I am testing it on android emulator and it shows this error but I don't know if it is related to the problem

error

UPDATE I have tested it on real device and same problem

1

There are 1 answers

0
Revaz Shalikashvili On

I have changed the code to

        ShareContent content = new ShareLinkContent.Builder()
            .setContentUrl(Uri.parse(text))
            .setShareHashtag( new ShareHashtag.Builder().setHashtag("io").build())
            .setPlaceId(id)
            .build();
    ShareDialog dialog = new ShareDialog(context);
    ShareDialog.Mode mode = ShareDialog.Mode.NATIVE;
    if (dialog.canShow( content, mode)){
        dialog.show(content,mode);
    } 

and it worked. I had to see facebook SDK code