Question

in the past few days I started encountering a problem while trying to post to facebook...

For information about my project, I use Unity3D with the social networking plugin from Prime31 for iOS.

Initially, the user is required to login then confirm that the app is allowed to post on the user's timeline.

This happens without flaw and I get response that everything happened properly, until I attempt to post to the timeline. Then I get a 500 internal server error.

here is the error the facebook api gives out:

response error: 500 internal server error
response text:

Response Headers:
    ACCESS-CONTROL-ALLOW-ORIGIN: *
    EXPIRES: Sat, 01 Jan 2000 00:00:00 GMT
    CONTENT-TYPE: application/json; charset=UTF-8
    WWW-AUTHENTICATE: OAuth "Facebook Platform" "unknown_error" "An unknown error has occurred."
    X-FB-REV: 1102018
    CONNECTION: keep-alive
    PRAGMA: no-cache
    CACHE-CONTROL: no-store
    DATE: Thu, 30 Jan 2014 15:07:54 GMT
    CONTENT-LENGTH: 87
    X-FB-DEBUG: q453qH5ianbIOyeof0X0Ah0PDpAlkxW9+OxLBusy2do=

and the function i am using to post to facebook is:

Facebook.instance.postMessageWithLinkAndLinkToImage(Message, URL, URLName, ImageURL, Caption, completionHandler);

I do make sure that the user is properly logged in and that the publish permissions have been given.

There has been no code changes with the plugin and my code handling the plugin before and after this issue started to occur, so clearly there is something I am missing. Is this Facebook server's fault? I have already contacted Prime31, but they say that they are not responsible for what the Facebook api responds with.

What can cause 500 internal server error when trying to post to Facebook?

EDIT: it would seem that the postMessageWithLinkAndLinkToImage boils down to:

graphRequest( "me/feed", HTTPVerb.POST, parameters, completionHandler );
Was it helpful?

Solution

A 500 means you are basically crashing the Facebook servers when you make a request. So something definitely changed on the Facebook API that is causing this to happen.

I would check the plugin code and see where it's making the API call, then you can manually make that API call using something like curl. If it fails then contact Facebook support and see if they can point you to the right API documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top