diff --git a/README.md b/README.md index d46bad7..b36b886 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,7 @@ Enhances navigation throughout Facebook simply through command prompts from the Currently under development. ==================================== + +Install the extension from http://bit.ly/WarSha + +Once installed, go to the address bar and type "fb help" to see the operable commands :) diff --git a/auth.js b/auth.js index 2581789..f11e719 100644 --- a/auth.js +++ b/auth.js @@ -12,11 +12,17 @@ * the getUserData function. * */ +/* +This function basically checks if the user is new to the app or not +If he/she isn't, then initiates data retreival +However, it doesn't work when user has updated his/her info i.e. added friends because localStorage +has stored data (which is why it's undefined) but doesn't have the new data function checkUserData() { if (localStorage['userData'] == undefined) { +*/ getUserData(); - } -} +//} +//} @@ -38,7 +44,7 @@ function getUserData() { * variable. Check the Facebook Graph Explorer to figure out what privary * requests you need to make. */ - var scope = "read_stream,offline_access"; + var scope = "read_stream,offline_access, publish_stream"; var validate_url = "https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=478063252251631&redirect_uri=https://obscure-reaches-7009.herokuapp.com/&scope=" + scope; var accessToken = ""; @@ -90,4 +96,4 @@ function getUserData() { } -checkUserData(); \ No newline at end of file +checkUserData(); diff --git a/background.js b/background.js index 660f194..e6d3d89 100755 --- a/background.js +++ b/background.js @@ -1,5 +1,5 @@ /* background.js - * author: Liam Horne + * author: Liam Horne, Nima Vaziri * project: fbplus * */ @@ -113,6 +113,7 @@ it will redirect to your own page. \ makeCommand("msg", function() {redirect("https://www.facebook.com/messages/", "https://www.facebook.com/messages/"+data)}); makeCommand("groups", function() {redirect("https://www.facebook.com/bookmarks/groups", undefined)}); makeCommand("apps", function() {redirect("https://www.facebook.com/bookmarks/apps", undefined)}); + makeCommand("timeline", function() {redirect("https://www.facebook.com/me/friends", "https://www.facebook.com/"+data)}); makeCommand("friends", function() {redirect("https://www.facebook.com/me/friends", "https://www.facebook.com/"+data+"/friends")}); makeCommand("gender", function() {alert(findField('gender',data))}); makeCommand("id", function() {alert(findField('id',data))}); @@ -139,4 +140,4 @@ it will redirect to your own page. \ checkCommands(); -}); \ No newline at end of file +});