I am an experienced .NET developer new to FB development. I am trying
to use the mobile-friendly login page at:
"
https://www.facebook.com/dialog/oauth?
client_id=XXXXXXXXX&redirect_uri=
http://localhost:8181/Welcome.aspx/
&display=touch&scope=email".
I am able to get the "code" and then get an access token (of sorts, a
"bearer token", I understand) in the format xxxxxxxxxx|xxxxxxxxxx,
which is missing the session part. I am executing this code via a web
request from server-side code to this address:
https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=xxxxxxxx&redirect_uri="
http://localhost:8181/welcome.aspx/&client_secret=xxxxxx&code=xxxxxxxxxxxx
Now, when I call this, it is my understanding that I must use the
param type=web_server. However, if I do, I get a 400 error. It will
work if I use type=client_cred. The token that is passed back is in
the format xxxxxx|xxxxxx.
If I try to execute this code via a server-side web request:
https://graph.facebook.com/me?access_token=" & UrlEncode(sAccessToken)
I get an "Invalid access token signature" .
I have been at this for 3 days now. I have tried every combination. I
am finding many contradictions and omissions in the FB documentation
and in postings on other forums. Can anybody help? This is language
independent, since I am making a web request to a URL.
Having said all this, I have no problem whatsoever doing this with the
<fb:login> button and reading from the cookie and manipulating objects
at will in a desktop browser environment. The only difference here is
the extra intermediate steps of getting the "code", the access token,
and the rest of it in order to use the mobile-friendly login page.
This is not the first or 2nd or twelveth time I have run into this
sort of showstopper with FB. I'm ready to give up altogether. I have
seen so many, many other people trying to solve this problem (kludge).
Any help would be most kindly appreciated,
Fred
On Feb 11, 6:02 pm, Marcel Stör <
mar...@frightanic.com> wrote:
> On 11.02.2011 13:37, Nikita wrote:
>
> > Look, i don't care about different types of tokens.
>
> Too bad, because you should. RestFB assumes you are
> familiar with the basics of the Facebook API.
>
> Cheers,
>
> --
> Marcel Stör,
http://www.frightanic.com