Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.051 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'api': 0.09; 'cc:addr :python-list': 0.10; 'subject:API': 0.16; 'unsupported': 0.16; 'fix': 0.17; 'skip:g 40': 0.17; 'requests': 0.18; 'email addr:gmail.com>': 0.20; 'import': 0.21; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'skip:[ 10': 0.26; 'skip:" 20': 0.26; 'message- id:@mail.gmail.com': 0.27; 'url:mailman': 0.29; 'skip:& 10': 0.29; "skip:' 10": 0.30; 'error': 0.30; 'code': 0.31; 'you?': 0.32; 'url:python': 0.32; 'print': 0.32; 'url:listinfo': 0.32; 'skip:& 20': 0.33; 'received:google.com': 0.34; 'server': 0.35; 'url:org': 0.36; 'skip:g 30': 0.36; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'url:mail': 0.40; 'facebook': 0.61; 'profile': 0.61; 'gave': 0.65; 'friend': 0.81; 'friends': 0.83; 'subject:Facebook': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2r0BPxVj65LZHjtn4c+UF7NrQGWZtkoMcXSuwZAmZpc=; b=x6gwtxILlFn3BwPG8z0+wBVHh7LD2sRWKNYBuMhBGX1+Pf5mqJsTgk8SP5z2yiFEIE J6D+I50XkW9wzvmYrXxGzCl3b8woajTNE6gwKaScfAcbsuIy1dVL4AurNqnCVCv38EpX uBEEr1gR04kipQLJG2LFFVJTaInli81gdQ2sfC1jFeiAcUYYSC8OalxFYkQViioY60XW /crBEmfKyB7tUQt9eO1LMHT8u+K5eZUwX3htWfVq5N0pu3WwkjnUzw6Z6Gksg7vUs1NL XzIxKnV3LpbdY2h4Q9fpQXQ+QdEFKNvswT2+nTbe4PRCypF7f8HSYCGnDKPfMl9Rra4V GvqA== MIME-Version: 1.0 X-Received: by 10.50.197.170 with SMTP id iv10mr9367471igc.62.1361288989197; Tue, 19 Feb 2013 07:49:49 -0800 (PST) In-Reply-To: <651b573c-b1f6-4343-93b6-d688d22d642d@googlegroups.com> References: <651b573c-b1f6-4343-93b6-d688d22d642d@googlegroups.com> Date: Tue, 19 Feb 2013 18:49:49 +0300 Subject: Re: Facebook Graph API From: =?KOI8-R?B?88HIzs/XIO3JyMHJzA==?= To: takeshi honda Content-Type: multipart/alternative; boundary=bcaec5396b50a3446604d615ca57 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 63 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361288997 news.xs4all.nl 6973 [2001:888:2000:d::a6]:41076 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39237 --bcaec5396b50a3446604d615ca57 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable You need to get token from API server before signing requests with it, don't you? 19.02.2013 16:42 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 "takeshi honda" =CE=C1=D0=C9=D3=C1=CC: > The following code gave me the error, "facebook.GraphAPIError: Unsupporte= d > operation". How can I fix this error? > > import facebook > import sys; > > token =3D 'mytokenxxxxxxxxx'; > > graph =3D facebook.GraphAPI(token) > profile =3D graph.get_object("myusername") > friends =3D graph.get_connections("myusername", "friends") # error occure= d > at this line. > > friend_list =3D [friend['name'] for friend in friends['data']] > print friend_list > -- > http://mail.python.org/mailman/listinfo/python-list > --bcaec5396b50a3446604d615ca57 Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable

You need to get token from API server before signing requests with it, d= on't you?

19.02.2013 16:42 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5= =CC=D8 "takeshi honda" <= moecho21@gmail.com> =CE=C1=D0=C9=D3=C1=CC:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"> The following code gave me the error, "facebook.GraphAPIError: Unsuppo= rted operation". How can I fix this error?

import facebook
import sys;

token =3D 'mytokenxxxxxxxxx';

graph =3D facebook.GraphAPI(token)
profile =3D graph.get_object("myusername")
friends =3D graph.get_connections("myusername", "friends&quo= t;) # error occured at this line.

friend_list =3D [friend['name'] for friend in friends['data'= ;]]
print friend_list
--
http://mail.python.org/mailman/listinfo/python-list
--bcaec5396b50a3446604d615ca57--