The situation I am trying to create is:
- I have a photo I want to upload to Facebook via the page feed.
- I want to tag someone (who is not a friend) along with the photo.
Right now, I am using the following code which opens another window where I can create my post and tag someone:
FB.ui({
method: 'feed',
link: '',
}, function(response){});
However, when I try to create the post, it says “href or media is required.”
How can I create a post with a photo without sharing a link, and so that I can still tag people who are not friends?
2
Answers
To upload a photo, you need to use the
/page-id/photos
endpoint. You have to authorize the user and use thetaggable_friends
endpoint to get friends for tagging. You canĀ“t tag people who are not your friends and you have to let Facebook review your use oftaggable_friends
.i have done this.just try below code.