I am using the PHP SDK to try to publish a simple action using the Graph API.
I created an object called 'Competition' and an action called 'Enter'. Thus, the user enters a contest.
My code looks like this:
try { $statusUpdate = $this->data['facebook']->api('/me/lovepoppycompetition:enter', 'post', array( 'competition' => 'https://apps.facebook.com/lovepoppycompetition/' )); echo '<pre>SUCCESS: '.print_r($statusUpdate, true).'</pre>'; } catch(FacebookApiException $e) { echo '<pre>FAILED: '.print_r($e, true).'</pre>'; }
I get an error (FacebookApiException):
(
I'm not quite sure why, especially since I use this code (with different objects / actions) in another application, without any problems itโs just fine.
Perhaps itโs worth noting that I didnโt post the action, although I donโt think I need it to work for me?
Thanks in advance.
source share