Gerinych

Socialite workaround

Feb 8th, 2012
1,353
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Socialite for Windows Developer Preview workaround
  2. ---------------------------
  3.  
  4. As you may know, the Socialite app in Windows Developer Preview has a bug that doesn't let you log in. Luckily, this can be sidestepped with this workaround. It's dirty, it's unstable, it can be confusing to some, but it works and that's pretty much what we want at the moment.
  5.  
  6. 1. Gathering info
  7. --------------------
  8. First of all, you will need to gather some info from your Facebook profile. You will need:
  9.  
  10. - Your profile ID (8-11 digit number)
  11. - Socialite authorization token
  12.  
  13. Profile ID
  14. If you don't have a username on Facebook, go to your profile page and look at the URL. It should look something like http://www.facebook.com/profile.php?id=##########. Copy the numbers that come after "id=" into any empty text file for future use.
  15.  
  16. If you do have a username, go to http://graph.facebook.com/<username>. Replace <username> with your username. You will be asked to download a small .js file. Download it, open it in Notepad and look for the "id" field inside. This is your number. Save it for future use.
  17.  
  18. Socialite authorization token:
  19. Open up Internet Explorer and follow the link below.
  20.  
  21. https://www.facebook.com/dialog/oauth?response_type=token&display=popup&client_id=171463892915039&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&scope=user_photos,read_stream,publish_stream,user_checkins,publish_checkins,friends_checkins,offline_access,status_update
  22.  
  23. If it asks you to log in to Facebook, do so. If it asks you to allow Socialite to post on your wall etc., click on "Allow". Eventually you will get to the page that says "Success". Look at its URL and copy the long string of characters between "access_token=" and "&expires_in". Save it somewhere with your profile ID for future use.
  24.  
  25. 2. Modifying the code
  26. ----------------------
  27. Open the "Run" dialog window (Windows Key-R), type in "compmgmt.msc" and press OK. On the left pane, expand "Local Users and Groups" and select "Users". In the middle pane, double click on Administrator and uncheck the box that says "Account is disabled". Apply changes, press Ctrl-Alt-Del and click on "Switch Users". You will see the Administrator account along with your normal account. Log in as Administrator.
  28.  
  29. After logging in, open up Windows Explorer and go to "C:\Program Files\Applications". This is a hidden system folder, so to be able to see it, you need to unhide hidden and system folders in Folder Options. If you still don't see it try "C:\Program Files (x86)\Applications". It might be in there, I'm not sure.
  30.  
  31. Once you're in Applications, open up the folder that starts with microsoft.socialite. Find a folder called js and open up Socialite.js with Notepad. Find this block of code:
  32.  
  33. Socialite.currentUserId = "";
  34. Socialite.currentUserAccessToken = "";
  35. Socialite.currentUserId = Socialite.Storage.getValue(Socialite.Constants.facebookUserIdKey);
  36. Socialite.currentUserAccessToken = Socialite.Storage.getValue(Socialite.Constants.facebookUserAccessTokenKey);
  37.  
  38. Insert your profile ID between the quotes in the first line and your authorization token between the quotes in the second line. Delete or comment out (put // in the beginning of the line) the last two lines, then save the file. If it doesn't let you save, go into the file's properties and go to the Security tab. Click on Edit, select the Administrator account in the top list and check "Modify" in the bottom list. Apply changes and try saving the file again. Log out of the Administrator account and log back into your normal account.
  39.  
  40. Go into Task Manager (Ctrl-Shift-Esc) and check if Socialite is running. If it does, end it. Run Internet Explorer and make sure you're logged into Facebook. Finally, open Socialite and, hopefully, you will see a menu instead of a log in screen. Good job, you!
  41.  
  42. -----------
  43. Other stuff
  44. -----------
  45. Since this is a temporary workaround, there are a few limitations. If you want to log in with another Facebook account, you will need to do all these steps again because the authorization token is tied to your Facebook account. Also, I would not recommend logging out from Socialite, although I haven't tried to do that.
  46.  
  47. If you get permission errors when you're trying to modify the application code, ask around on Facebook, I'll probably answer you or modify this document with instructions on resolving this issue. If you have any other issues, ask around on Facebook, but please do not post your authorization token, it's a huge security risk.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×