Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #8 from change/pm-add-friend-options

Pm add friend options
@alif reviewed
  • Loading branch information...
commit f212d6d7e36bc21e6053cd970746e1d94a6be9eb 2 parents 9d05c98 + e1f39ab
@Praneeta Praneeta authored
View
2  Gemfile
@@ -1,4 +1,6 @@
source "http://rubygems.org"
+ruby '1.9.3'
+
# Specify your gem's dependencies in facebook-stub.gemspec
gemspec
View
7 bin/facebook-stub.js
@@ -406,9 +406,12 @@
FBWorld.state('connected', false);
}
- function addFriend(id, name) {
+ function addFriend(id, name, options) {
var friends = FBWorld.friendList();
- friends.push({id: id, name: name});
+ var extendedOptions = options || {}
+ extendedOptions.id = id;
+ extendedOptions.name = name;
+ friends.push(extendedOptions);
FBWorld.Helpers.makeMeACookie('fb_friends', JSON.stringify(friends), cookieOptions);
}
View
7 lib/assets/javascripts/facebook_stub/core.js
@@ -406,9 +406,12 @@
FBWorld.state('connected', false);
}
- function addFriend(id, name) {
+ function addFriend(id, name, options) {
var friends = FBWorld.friendList();
- friends.push({id: id, name: name});
+ var extendedOptions = options || {}
+ extendedOptions.id = id;
+ extendedOptions.name = name;
+ friends.push(extendedOptions);
FBWorld.Helpers.makeMeACookie('fb_friends', JSON.stringify(friends), cookieOptions);
}
View
2  lib/facebook_stub/version.rb
@@ -1,3 +1,3 @@
module FacebookStub
- VERSION = "0.0.2.0"
+ VERSION = "0.0.2.1"
end
Please sign in to comment.
Something went wrong with that request. Please try again.