I’m starting to use facebook graph api to create events with javascript!
It works very well except for image.
I create event in this way:
FB.api("/"+idOwner+"/events?access_token="+access_token,'post',{
name: 'TEST',
start_time: '2011-12-01T15:00:00',
privacy_type:"OPEN",
end_time: '2011-12-02T15:00:00',
location: 'here',
picture: 'http://www.ostianews.it/wp-content/uploads/2010/06/rock.jpg'
});
idOwner and access_token are two variables.
In this way it creates me event without picture.
How can I load picture on my event????
Have a good evening!!! Bye!
You can consider using the following solution
If you absolutely want to do in JS, make an ajax to execute this code and return the Event Id ($result[“id”])
I did it and it worked perfectly.
ps: Thanks to Adam Heath who found the solution at Attach image to Facebook event (php sdk, rest or graph api)