pythonfacebookfacebook-graph-api

Facebook API | facebook.GraphAPIError: (#100) Only owners of the URL have the ability to specify the picture


Hi i'm owner of a facebook page, inside it i would like to post some contents taken from web site. for example i want to post an item of amazon like this:

https://www.amazon.it/dp/....

if i post manually the url i can see correctly the preview and all details related to the item but programmatically i can't

i am using python 3.6 and actually i have this script:

import facebook
graph = facebook.GraphAPI(access_token=token)

attachment =  {
        'name': 'Link name',
        'link': 'https://www.amazon.it/dp/...',
        'caption': 'Check out this example',
        'description': 'This is a longer description of the attachment',
        'picture': 'url_of_the_image'
    }

graph.put_wall_post(message='Check this out...', attachment=attachment, profile_id='my_page_id')

when i launch the script it raise the exception

raise GraphAPIError(result)
    facebook.GraphAPIError: (#100) Only owners of the URL have the ability to specify the picture, name, thumbnail or description params.

I googled for it and i found similar issues solved registering the domain in the Business manager dashboard, i tried it but it says "Amazon domain already registered" (obviously)

What can i do?


Solution

  • You do not own www.amazon.it (i assume), so you cannot use your own picture or your own Open Graph data. Dynamic data is not possible anymore anyway, you need to use Open Graph tags in the source of the shared URLs instead. They get used automatically.