The time I made the sample code ran and allowed me to log in (one that came bundled with the Facebook iOS SDK from GitHub), I began realizing that the token quite have different format than the one we usually see in web-based apps (e.g. FB iFrame app).
The usual token looks something like this:
213455681425|1.BGgrgnfWrdpG_X18.3600.1213252135.2-1334679|dHcDbxGbeYbLg3SRgw12fdf4gd60
..while in mobile:
v9ylvkttPnuFWUX4KVdjDPB0SRXkuKX7z281rqjHuG0.eyJpdiI6ImEwWXBDaEtncWpDTU5ibUNuQWdROWcifQ.Y-DwxRY2ZAFZiP7EVuR-HksXqmGw9LXP6umGrfz2XnjSLm0a508u7_jXq0_Kz5a2S8AUUulzUvIRVxTS51_i6VfSByOCbFBIKoBe0-n-Pa8NC29wbuVmGJLvq4W-ezhv0DzA3diiCIqCybt9ELDXoA
The plan was, allow users to connect to our application using FB. Then once he approved it, we take a copy of the access_token and save it back to the server. Same access_token will be used once he logs in to his account using our web-based app.
Well, so far so good. Let me know if yours doesn't work.
Related posts: