开发者

Using YQL to get Facebook album photos

I'm very excited about YQL, and I need to get photos from Facebook album. I've 开发者_运维技巧found that it's easy to get photos with public table Facebook, and method facebook.photos.get. The only problem for me, is that YQL-query requires authorization information, so for example

select * from facebook.photos.get where aid=278784

returns

Cannot find required keys in where clause; got 'aid', expecting required keys: (fb_sig_session_key, secret, fb_sig_api_key)

So, what can I do to login? It would be great, if it is possible to do with YQL, and without using external oAuth stuff.


It would be great, if it is possible to do with YQL, and without using external oAuth stuff.

YQL is an intermediary for fetching data from webservices. In cases like this, where authentication is required at the source (Facebook), it would also be required via YQL.

Also, I believe these YQL Facebook tables are now out of date (last modified Sept 2009) and since then Facebook has moved to OAuth 2.0 authentication.

As an additional FYI when using tables like this, you can look at the XML source to see which parameters are required. In the YQL console, you can see the source for the facebook.photos.get table with the command: desc facebook.photos.get. In the XML source of the table, you can see the "required" parameters identified:

<select>
  <key name="secret" required="true" type="xs:string"/>
  <key name="fb_sig_session_key" required="true" type="xs:string"/>
  <key name="fb_sig_api_key" required="true" type="xs:string"/>
  <key name="subj_id" type="xs:string"/>
  <key name="aid" type="xs:string"/>
  <key name="pids" type="xs:string"/>
</select>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜