Class: Omnisocial::FacebookAccount
Instance Method Summary
collapse
create_from_auth_hash, find_or_create_from_auth_hash
Instance Method Details
#account_url ⇒ Object
10
11
12
|
# File 'app/models/omnisocial/facebook_account.rb', line 10
def account_url
"http://facebook.com/#{self.login}"
end
|
#assign_account_info(auth_hash) ⇒ Object
3
4
5
6
7
8
|
# File 'app/models/omnisocial/facebook_account.rb', line 3
def assign_account_info(auth_hash)
self.token = auth_hash['credentials']['token']
self.remote_account_id = auth_hash['uid']
self.login = auth_hash['user_info']['nickname']
self.name = auth_hash['user_info']['name']
end
|
#picture_url ⇒ Object
14
15
16
17
18
19
20
|
# File 'app/models/omnisocial/facebook_account.rb', line 14
def picture_url
if self.login.include?('profile.php')
"https://graph.facebook.com/#{self.login.gsub(/[^\d]/, '')}/picture?type=square"
else
"https://graph.facebook.com/#{self.login}/picture?type=square"
end
end
|