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
{ | |
"data": [ | |
{ | |
"id": "256490621109681_372366636188745", | |
"from": { | |
"name": "SethAirport", | |
"category": "Airport", | |
"id": "256490621109681" | |
}, | |
"to": { |
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
{ | |
data: [ | |
{ | |
id: "256490621109681_372366636188745", | |
from: { | |
name: "SethAirport", | |
category: "Airport", | |
id: "256490621109681" | |
}, | |
to: { |
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
{ | |
data: [ | |
{ | |
id: "256490621109681_366093176816091", | |
from: { | |
name: "SethAirport", | |
category: "Airport", | |
id: "256490621109681" | |
}, | |
story: ""test comment" on their own link.", |
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
{ | |
"data": [ | |
{ | |
"id": "256490621109681_366093176816091", | |
"from": { | |
"name": "SethAirport", | |
"category": "Airport", | |
"id": "256490621109681" | |
}, | |
"story": "\"test comment\" on their own link.", |
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
require './my_queue' | |
require 'rspec' | |
describe MyQueue do | |
it "initializes with a size of zero" do | |
MyQueue.new.size.should eq 0 | |
end | |
it "is empty after initialization" do | |
MyQueue.new.is_empty?.should eq true |
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
class MyQueue | |
attr_accessor :size | |
def initialize | |
@size = 0 | |
@items = [] | |
end | |
def is_empty? | |
@size == 0 |
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
require 'facebook_request' | |
Koala.http_service.faraday_middleware = Proc.new do |builder| | |
builder.use Faraday::Request::FacebookRequest | |
builder.request :multipart | |
builder.use Koala::MultipartRequest | |
builder.request :url_encoded | |
builder.adapter Faraday.default_adapter | |
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
@graph.graph_call("256490521109781_257541777681235", {:is_hidden => true}, "post", {}) |
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
args = {:title => "Example Title", :description => "Description", :start_time => "1329417443"} | |
milestone = @graph.put_connections("256490621109681", "milestones", args) |
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
#first instantiate the graph api with our access token | |
@graph = Koala::Facebook::API.new("ACFTHNIWeX5MBAEZCdoXPE7nsltT3tVuqiVoKCIO0CassXFqRzU2uBb1htT3kq2YNcsnJOlsZAqRpmi8wZDZD") | |
#retrieve a page's milestones | |
milestones = @graph.get_connection("256490626309681", "milestones") |