0

i am trying to fetch page info. of myself. i have written code in python as

import facebook
import sys
import codecs
api_key = 'key'
secret_key = 'secret_key'
client = facebook.Facebook(api_key, secret_key)
client.auth.createToken()
client.login()
print '[*] Please login / give permission application to access you . Then press enter key to continue...'
raw_input()
client.auth.getSession()
client.request_extended_permission("publish_stream", popup=False)
raw_input()  
print "\n"
info_pages = client.pages.getInfo([client.uid])
for info in info_pages:
    for attr in info:
        print '%s: %s' % (attr, info[attr])
info_pages =client.pages.getInfo('page_id','website','my uid')
print info_pages
print "\n\n"
for info in info_pages:
    print info
    for attr in info:
        print attr,":",str(info[attr]).replace("\n","\t")
print "\n"

but i am getting error as

facebook.FacebookError: Error 100: Param page_ids must be a valid page ID

how do should i use page_ids. please modify me

4

1 回答 1

0

Traceback 如下...

Traceback (most recent call last):
  File "page.py", line 19, in <module>
    info_pages =client.pages.getInfo('page_id','website','my uid')
  File "build/bdist.linux-i686/egg/facebook/__init__.py", line 877, in facebook_method
  File "build/bdist.linux-i686/egg/facebook/__init__.py", line 900, in __call__
  File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1558, in __call__
  File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1491, in _parse_response
  File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1438, in _check_error
facebook.FacebookError: Error 100: Param page_ids must be a valid page ID
于 2012-09-20T18:06:04.843 回答