skip to Main Content

The situation I am trying to create is:

  1. I have a photo I want to upload to Facebook via the page feed.
  2. 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


  1. To upload a photo, you need to use the /page-id/photos endpoint. You have to authorize the user and use the taggable_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 of taggable_friends.

    Login or Signup to reply.
  2. i have done this.just try below code.

      FB.ui({
          method: 'feed',
          display: 'popup',
          picture:'file_Path',
      }, function(response){});
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search