forked from mmangino/facebooker
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:mmangino/facebooker
* 'master' of github.com:mmangino/facebooker: (46 commits) Bump version facebook.stream.get for some viewer. a helpful note got the rest of the tests Added change new parser for weird xml in dashboard apis more comprehensive tests for dashboard api changes news and some activity Support for new dashboard counter APIs, removed logger from fb_connect.rb Added support for the method "facebook.users.IsAppUser", via User#app_user? Support for methods 'facebook.comments.add','facebook.comments.remove', and 'facebook.comments.get'. fix path to facebooker.yml for Rake facebooker:setup task Support for method 'facebook.message.getThreadsInFolder', and 'read_mailbox' extended permission. Added #page_url to the attr_accessor section of Facebooker::Page Revert "Add page_url to pages" Add page_url to pages Change redirect to accept status, but ignore it Alias Page#page_id as Page#id Updating facebook ssl url per fb documentation Add comment to rack setup ...
- Loading branch information
Showing
31 changed files
with
1,705 additions
and
60 deletions.
There are no files selected for viewing
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'facebooker/model' | ||
module Facebooker | ||
## | ||
# A simple representation of a comment | ||
class Comment | ||
include Model | ||
attr_accessor :xid, :fromid, :time, :text, :id | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
require 'facebooker/model' | ||
module Facebooker | ||
class MessageThread | ||
include Model | ||
|
||
id_is :thread_id | ||
attr_accessor :subject, :updated_time, :recipients | ||
attr_accessor :parent_message_id, :parent_thread_id, :message_count | ||
attr_accessor :snippet, :snippet_author, :object_id, :unread | ||
|
||
class Message | ||
include Model | ||
|
||
attr_accessor :message_id, :author_id, :body, :created_time, :attachment, :thread_id | ||
|
||
# An attachment can be a photo, a video, or a link | ||
class Attachment | ||
include Model | ||
|
||
attr_accessor :name, :href, :icon, :caption, :description | ||
|
||
# The Facebook messages API is in beta, this helper method is supposed to fail anytime soon | ||
def video? | ||
self.href =~ /\Ahttp:\/\/www\.facebook\.com\/video\/video\.php.*/ | ||
end | ||
|
||
# The Facebook messages API is in beta, this helper method is supposed to fail anytime soon | ||
def photo? | ||
self.href =~ /\Ahttp:\/\/www\.facebook\.com\/photo\.php.*/ | ||
end | ||
|
||
# The Facebook messages API is in beta, this helper method is supposed to fail anytime soon | ||
def link? | ||
!video? && !photo? | ||
end | ||
end | ||
hash_settable_accessor :attachment, Facebooker::MessageThread::Message::Attachment | ||
end | ||
hash_settable_list_accessor :messages, Facebooker::MessageThread::Message | ||
|
||
end | ||
end | ||
|
||
# Example of attachments | ||
|
||
# -- Photo -- | ||
|
||
# <attachment> | ||
# <media list="true"/> | ||
# <href>http://www.facebook.com/photo.php?pid=12345&id=54321</href> | ||
# <properties list="true"/> | ||
# <icon>http://b.static.ak.fbcdn.net/rsrc.php/zB010/hash/9yvl71tw.gif</icon> | ||
# <fb_object_type/> | ||
# <fb_object_id/> | ||
# <tagged_ids list="true"/> | ||
# </attachment> | ||
|
||
# -- Webcam video -- | ||
|
||
# <attachment> | ||
# <media list="true"/> | ||
# <name>Feb 10, 2010 1:26pm</name> | ||
# <href>http://www.facebook.com/video/video.php?v=12345</href> | ||
# <properties list="true"/> | ||
# <icon>http://static.ak.fbcdn.net/rsrc.php/zB010/hash/9yvl71tw.gif</icon> | ||
# <fb_object_type/> | ||
# <fb_object_id/> | ||
# <tagged_ids list="true"/> | ||
# </attachment> | ||
|
||
# -- Link -- | ||
|
||
# <attachment> | ||
# <media list="true"> | ||
# <stream_media> | ||
# <href>http://www.facebook.com/l.php?u=http%253A%252F%252Fwww.google.fr%252F&h=e46dd63cdbfadb74958fbe44e98f339c</href> | ||
# <type>link</type> | ||
# <src>http://external.ak.fbcdn.net/safe_image.php?d=dd54bba6b6e6479a89bb8084573c02c8&w=90&h=90&url=http%3A%2F%2Fwww.google.fr%2Fintl%2Ffr_fr%2Fimages%2Flogo.gif</src> | ||
# </stream_media> | ||
# </media> | ||
# <name>Google</name> | ||
# <href>http://www.facebook.com/l.php?u=http%253A%252F%252Fwww.google.fr%252F&h=e46dd63cdbfadb74958fbe44e98f339c</href> | ||
# <caption>www.google.fr</caption> | ||
# <properties list="true"/> | ||
# <icon>http://b.static.ak.fbcdn.net/rsrc.php/zB010/hash/9yvl71tw.gif</icon> | ||
# <fb_object_type/> | ||
# <fb_object_id/> | ||
# <tagged_ids list="true"/> | ||
# </attachment> |
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
Oops, something went wrong.