Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83211
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-01-04 09:03 -0800 |
| Message-ID | <62fdbcf0-0c40-4fde-b018-4a0b55921fb6@googlegroups.com> (permalink) |
| Subject | Probem with fbconsole |
| From | Ole Andreas Gløersen <ole.andreas.gloersen@gmail.com> |
I want to enter text msg and upload picture (so all friends can see and some private pictures) to my Facebook acount.
I'm working with fbconsole (it's important that it is text based command line) for setting up cron job on a Raspberry Pi.
My code:
import fbconsole
redirect_uri = "https://local.fbconsole.com:8080/"
fbconsole.SITE_URL=redirect_uri
fbconsole.APP_ID = 'my_SW_ID'
fbconsole.AUTH_SCOPE = ['read_stream']
fbconsole.automatically_authenticate('my_FB_ID','my_FB_PWD','Security_code',fbconsole.SITE_URL,True)
My result:
pi@raspberrypi ~/facebook $ python f.py
send: 'GET /dialog/oauth?scope=read_stream&state=Deletet....Deletet....&redirect_uri=https%3A%2F%2Flocal.fbconsole.com%3A8080%2F&client_id=Deletet.... HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.facebook.com\r\nConnection: close\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Pragma: no-cache
header: Facebook-API-Version: v2.2
header: X-Frame-Options: DENY
header: Cache-Control: private, no-cache, no-store, must-revalidate
header: Expires: Sat, 01 Jan 2000 00:00:00 GMT
header: X-XSS-Protection: 0
header: X-Content-Type-Options: nosniff
header: Content-Type: text/html; charset=utf-8
header: X-FB-Debug: Deletet.............Deletet....
header: Date: Sun, 04 Jan 2015 16:51:31 GMT
header: Connection: close
Traceback (most recent call last):
File "f.py", line 13, in <module>
fbconsole.automatically_authenticate('Deletet....','Deletet....','Deletet....',fbconsole.SITE_URL,True)
File "/usr/local/lib/python2.7/dist-packages/fbconsole.py", line 413, in automatically_authenticate
browser.select_form(nr=0)
File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 524, in select_form
raise FormNotFoundError("no form matching "+description)
mechanize._mechanize.FormNotFoundError: no form matching nr 0
pi@raspberrypi ~/facebook $
Can anyone help me futher on?
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Probem with fbconsole Ole Andreas Gløersen <ole.andreas.gloersen@gmail.com> - 2015-01-04 09:03 -0800 Re: Probem with fbconsole Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-04 17:13 +0000
csiph-web