Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iOS SDK 3.1: "Error: HTTP status code: 400"

I am running the Facebook SDK 3.1 on Xcode 4.5GM with iOS6 simulator. I connect to FB in the iOS settings and successfully FB connect in my app using the new iOS6 FBConnect UI. I have an access token, can see my friends, send app requests, post to my wall, etc. However, every time I initiate any sort of FBURLConnection is made, I see this printed to my console:

Error: HTTP status code: 400

I went into the FB code and printed the reponse when this error is printed and I get:

{
    body =     {
        error =         {
            code = 100;
            message = "(#100) The parameter 'attribution' is required for the 'mobile_app_install' activity";
            type = OAuthException;
        };
    };
    code = 400;
}

Does anyone know how to resolve this? All functionality seems to work, but I keep seeing this spam my console.

like image 384
stipe108 Avatar asked Sep 26 '12 05:09

stipe108


2 Answers

Right after the session is created do this:

[FBSession setActiveSession:session];
like image 197
Anthony Dmitriyev Avatar answered Oct 10 '22 18:10

Anthony Dmitriyev


As best as I can tell, this is a bug introduced in the 3.1 SDK. Looking at the network traffic with Charles, they’re trying to POST to graph.facebook.com/[user id]/activities but it’s failing.

like image 21
cbowns Avatar answered Oct 10 '22 16:10

cbowns