The Artima Developer Community
Sponsored Link

Agile Buzz Forum
What is up With Getting Facebook Activity Streams?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
What is up With Getting Facebook Activity Streams? Posted: Jun 11, 2009 3:38 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: What is up With Getting Facebook Activity Streams?
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Supposedly, I can get an Atom feed of my Facebook Activity Stream by issuing an HTTP request with a specific set of url arguments. That's documented by Facebook, as I laid out earlier. So if I try a request with the signature created like so:




createFetchSignatureFor: secretHolder inSession: session

	"create the signature argument"



	| stream |

	stream := WriteStream on: String new.

	stream nextPutAll: 'app_id=', secretHolder applicationId.

	stream nextPutAll: 'session_key=', session key.

	stream nextPutAll: 'source_id=', session uid printString.

	stream nextPutAll: session secret.

	^(MD5 hash: stream contents) asHexString asLowercase



and the url created as follows:




getUrlWithSecret: secretHolder url: activityStreamUrl session: session



	| stream sigString |

	stream := WriteStream on: String new.

	stream nextPutAll: activityStreamUrl.

	sigString := self 

			createFetchSignatureFor: secretHolder 

			inSession: session.

	stream nextPut: $?.

	stream nextPutAll: 'source_id=' , session uid printString.

	stream nextPutAll: '&app_id=' , secretHolder applicationId.

	stream nextPutAll: '&session_key=' , session key.

	stream nextPutAll: '&sig=' , sigString.

	^stream contents



I get back a 403, telling me: "HTTP/1.1 403 Forbidden: Lacking extended permission"

Which is incorrect; I know my app has the appropriate permissions. If I add the optional arguments:




getUrlWithSecret: secretHolder url: activityStreamUrl session: session



	| stream sigString |

	stream := WriteStream on: String new.

	stream nextPutAll: activityStreamUrl.

	sigString := self 

			createFetchSignatureFor: secretHolder 

			inSession: session.

	stream nextPut: $?.

	stream nextPutAll: 'source_id=' , session uid printString.

	stream nextPutAll: '&app_id=' , secretHolder applicationId.

	stream nextPutAll: '&session_key=' , session key.

	stream nextPutAll: '&sig=' , sigString.

	stream nextPutAll: '&v=0.7'.

	stream nextPutAll: '&read'.

	^stream contents



I instead get a 401: HTTP/1.1 401 Unauthorized: Invalid 'sig' signature

Which I'm not understanding, as I follow the process Facebook specifies. Anyone worked with this before know what I'm doing wrong, or is this a Facebook bug? I'm leaning that way, based on this forum post I found...

Technorati Tags: ,

Read: What is up With Getting Facebook Activity Streams?

Topic: Smalltalk Daily 6/10/09: Cross Platform Previous Topic   Next Topic Topic: Why Kirk is Better than Picard

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use