Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39213 > unrolled thread
| Started by | takeshi honda <moecho21@gmail.com> |
|---|---|
| First post | 2013-02-19 04:37 -0800 |
| Last post | 2013-02-19 18:49 +0300 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Facebook Graph API takeshi honda <moecho21@gmail.com> - 2013-02-19 04:37 -0800
Re: Facebook Graph API Terry Reedy <tjreedy@udel.edu> - 2013-02-19 10:33 -0500
Re: Facebook Graph API Сахнов Михаил <sahnov.m@gmail.com> - 2013-02-19 18:49 +0300
| From | takeshi honda <moecho21@gmail.com> |
|---|---|
| Date | 2013-02-19 04:37 -0800 |
| Subject | Facebook Graph API |
| Message-ID | <651b573c-b1f6-4343-93b6-d688d22d642d@googlegroups.com> |
The following code gave me the error, "facebook.GraphAPIError: Unsupported operation". How can I fix this error?
import facebook
import sys;
token = 'mytokenxxxxxxxxx';
graph = facebook.GraphAPI(token)
profile = graph.get_object("myusername")
friends = graph.get_connections("myusername", "friends") # error occured at this line.
friend_list = [friend['name'] for friend in friends['data']]
print friend_list
[toc] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2013-02-19 10:33 -0500 |
| Message-ID | <mailman.2031.1361288055.2939.python-list@python.org> |
| In reply to | #39213 |
On 2/19/2013 7:37 AM, takeshi honda wrote:
> The following code gave me the error, "facebook.GraphAPIError: Unsupported operation". How can I fix this error?
>
> import facebook
> import sys;
>
> token = 'mytokenxxxxxxxxx';
>
> graph = facebook.GraphAPI(token)
> profile = graph.get_object("myusername")
> friends = graph.get_connections("myusername", "friends") # error occured at this line.
Look in the reference for GraphAPI (Facebook account login required) to
find out what you should have written instead of 'get_connections'.
> friend_list = [friend['name'] for friend in friends['data']]
> print friend_list
>
--
Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Сахнов Михаил <sahnov.m@gmail.com> |
|---|---|
| Date | 2013-02-19 18:49 +0300 |
| Message-ID | <mailman.2036.1361288997.2939.python-list@python.org> |
| In reply to | #39213 |
[Multipart message — attachments visible in raw view] — view raw
You need to get token from API server before signing requests with it,
don't you?
19.02.2013 16:42 пользователь "takeshi honda" <moecho21@gmail.com> написал:
> The following code gave me the error, "facebook.GraphAPIError: Unsupported
> operation". How can I fix this error?
>
> import facebook
> import sys;
>
> token = 'mytokenxxxxxxxxx';
>
> graph = facebook.GraphAPI(token)
> profile = graph.get_object("myusername")
> friends = graph.get_connections("myusername", "friends") # error occured
> at this line.
>
> friend_list = [friend['name'] for friend in friends['data']]
> print friend_list
> --
> http://mail.python.org/mailman/listinfo/python-list
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web