Send facebook event to my wall

I cannot get the event image, and it also gives me a fatal error trying to connect to the event image.
Can I share an (already created) event (not create it, just a link to it - with an image and description) and place it on the wall?

He is what I already have:

$facebook->api('/me/feed', 'post', array( 'message' => 'event test', 'link' => 'https://www.facebook.com/events/event id/', 'picture' => 'https://www.facebook.com/events/event id/',//produces an error 'name' => 'event test', 'caption' => '', 'description' => 'event desc', )); 
+4
source share
3 answers

It:

 $facebook->api('/me/feed', 'post', array( 'link' => 'https://www.facebook.com/events/event id/' )); 

does not work? All other information should be available for facebook.


Edit

I have no idea why a simple collaborative event doesn't work. Even with the delivery of information, the image cannot be loaded (as you wrote) with a message stating that the photos submitted from fb CDs cannot be divided.

I have two possible workarounds:

1) You can request event information using api and then post this, for example, using js sdk:

 FB.api("EVENT_ID", function(response) { FB.ui({ method: "feed", link: "http://www.facebook.com/events/EVENT_ID/", name: response.name, description: response.description }); }); 

As for the image, since you do this on your servers, you can upload the image ( https://graph.facebook.com/EVENT_ID/picture?type=large ), save it on your server and then add it to the message.

2) In accordance with the Invited Event Object Connection :

You can invite users to the event by sending HTTP POST / EVENT _ID / invited / USER_ID. You can invite multiple users by issuing HTTP POST to / EVENT_ID / invited users = USER_ID1, USER_ID2, USER_ID3. Both of them require create_event permission and return true if the invitation is successful.

This way you can directly invite friends to the event.
I know this is not the same, but it may be better than nothing, depending on what you need it for.


I recommend that you open an error report in the error system .

+2
source

Try using the /me/links connection instead of link as a link to the Facebook event and message as the description you want to add

A link shared

on the ticker

And here it compares with the built-in share

Comparing the two, shows the same presentation

For more on /links see http://developers.facebook.com/docs/reference/api/user/#links

+2
source

FYI /me/links has a known bug with several parameters that it supposedly accepts. Afaik, the FB still hasn't fixed it, despite what was originally reported last year and then again in January of this year. Although the error report is page-oriented, it may be due to the problem you are facing:

Error link

I’m trying to do the same as you, and it was the royal PITA from the very beginning, and I still haven’t done it after a lot of effort. Good luck

+2
source

Source: https://habr.com/ru/post/1414255/


All Articles