i am using the following code to post status update to a users profile in facebook but every time it just returns could not update what is wrong here ?
def fb_post_message(request):
import urllib2
try:
urllib2.urlopen('https://graph.facebook.com/me/feed',"message='hello world'")
except:
return HttpResponse('could not submit')
return HttpResponse('submitted');
If that is your actual code, and you haven’t edited any sensitive information out, then you are not even authenticating to Facebook as a user. So, of course, it won’t be able to submit the change.
I highly recommend using a library designed to interface with Facebook’s APIs. For information on Python libraries that interface with Facebook, see the User:Python page on the Facebook Developer Wiki.