-2

After I read this https://developers.facebook.com/docs/graph-api/reference/event/photos/#Creating I'm not sure that POST request is Upload photo to event or just upload url photo (param "url" in the table) or else ? I try to find any example but still can't find any of it.

crazyoxygen
  • 706
  • 1
  • 11
  • 30

1 Answers1

1

As it says there in the description of the url field,

The URL of a photo that is already uploaded to the Internet. You must specify this or a file attachment

The second part means, you can also upload a file (instead of providing a URL). The parameter name for uploads historically has been source – but you can use basically any name, the API doesn’t care. (If you post to a /photos endpoint and the data contains a file upload, then the API will use that, no matter what it is named.)

You can follow this example, https://developers.facebook.com/docs/php/howto/example_upload_photo – that is for an upload to a user profile, but it works the same way for events etc.

CBroe
  • 91,630
  • 14
  • 92
  • 150