Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39232

Re: Facebook Graph API

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 <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; '(facebook': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:API': 0.16; 'unsupported': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'jan': 0.18; 'written': 0.20; 'import': 0.21; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; 'skip:" 20': 0.26; 'am,': 0.27; 'header:X-Complaints- To:1': 0.28; "skip:' 10": 0.30; 'error': 0.30; 'code': 0.31; 'print': 0.32; 'to:addr:python-list': 0.33; 'received:org': 0.36; 'skip:g 30': 0.36; 'should': 0.36; 'subject:: ': 0.38; 'login': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'facebook': 0.61; 'profile': 0.61; 'gave': 0.65; 'account': 0.67; 'friend': 0.81; 'friends': 0.83; 'honda': 0.84; 'received:fios.verizon.net': 0.84; 'required)': 0.84; 'subject:Facebook': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Facebook Graph API
Date Tue, 19 Feb 2013 10:33:43 -0500
References <651b573c-b1f6-4343-93b6-d688d22d642d@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
In-Reply-To <651b573c-b1f6-4343-93b6-d688d22d642d@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2031.1361288055.2939.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361288055 news.xs4all.nl 6844 [2001:888:2000:d::a6]:54300
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39232

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web