Created
December 27, 2010 21:24
-
-
Save kenmazaika/756570 to your computer and use it in GitHub Desktop.
Access Facebook API through Koala interface using Authlogic Connect Login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
connect: | |
facebook: | |
key: "119725921411445" | |
secret: "de2ec43f3c013ef123cfb2e4b43402ca" | |
label: "Facebook" | |
options: # <------ Add these lines to | |
scope: "email, offline_access, publish_stream" # <------ customize fb perms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authlogic-Connect | |
# If we want to be able to access facebook data, we'd need to be able | |
# to access the fakebook oauth token. this will need to be accessible. | |
# kenmaz@kenmaz:~/source/who$ rails dbconsole | |
# Reading table information for completion of table and column names | |
# You can turn off this feature to get a quicker startup with -A | |
# Welcome to the MySQL monitor. Commands end with ; or \g. | |
# Your MySQL connection id is 2203 | |
# Server version: 5.1.41-3ubuntu12.6 (Ubuntu) | |
# Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. | |
# mysql> select * from access_tokens\G | |
# ....... | |
# token: HIDDEN | |
# ....... | |
# Use Koala | |
@graph = Koala::Facebook::GraphAPI.new('HIDDEN') | |
@graph.put_like("coca-cola") #does not work for most apps, manually like if you want to post on a page; | |
@graph.put_object('coca-cola', 'feed', {:message => 'testman'}) | |
# Just Posted 'testman' on cocacola page' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'koala' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment