

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in com.googlegroups.google-appengine[google-appengine] Re: Is there a way...| From | Sent On | Attachments |
|---|---|---|
| todd | Jun 3, 2008 3:26 pm | |
| todd | Jun 5, 2008 11:11 pm | |
| James Strachan | Jun 6, 2008 10:48 pm | |
| joh...@easypublisher.com | Jun 7, 2008 7:46 am | |
| joh...@easypublisher.com | Jun 7, 2008 7:54 am | |
| James Strachan | Jun 7, 2008 9:56 am | |
| James Strachan | Jun 10, 2008 4:30 am | |
| Ryan W | Jul 8, 2008 11:22 pm | |
| Ryan W | Jul 9, 2008 8:55 am | |
| James Strachan | Jul 15, 2008 5:42 am | |
| Jorge Vargas | Jul 16, 2008 7:31 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [google-appengine] Re: Is there a way to make sure HTTP_REFERER is not set? | Actions... |
|---|---|---|
| From: | joh...@easypublisher.com (joh...@easypublisher.com) | |
| Date: | Jun 7, 2008 7:54:33 am | |
| List: | com.googlegroups.google-appengine | |
To answer my own question:
On Apr 9, 2007, at 2:12 PM, rag wrote: "Sorry, due to abusive behaviour, we have been forced to disable posting from external websites. If you are posting from an API tool, please ensure that the HTTP_REFERER header is not set."
So it seems like your not allowed to post to twitter from external web sites.
Looking at urlfetch.py, I'm wondering if it would be possible to override the fetch function (e.g. roll your own) and intercept the request after it's been generated from urlfetch_service_pb.URLFetchRequest(), assuming it is URLFetchRequest() that addes the unwanted headers. (Just a wild idea, if you try it let me know).
/Johan
Any reason why twitter API has this requirement? /Johan
On 6/7/08, James Strachan <jame...@gmail.com> wrote:
Damn I just hit this too. I wonder why the referer is mandatory from GAE?
2008/6/6 todd <tm...@possibility.com>:
It turns out GAE automatically adds a Referer header and Referer is said to be one of the headers you can't change. That means you can't post to Twitter from GAE.
On Jun 3, 3:26 pm, todd <t....@possibility.com> wrote:
Howdy,
I've been using GAE to make Twitter calls. In the last few days my Twitter API calls started failing with this error:
403 Forbidden: The server understood the request, but is refusing to fulfill it. If you are posting from an API tool please ensure that the HTTP_REFERER header is not set.
To my knowledge I'm not setting referer (code appended). My code has been working for a long time after Twitter required HTTP_REFERER header to not be set.
Has anything changed on the GAE side? The code works from the test web server but fails when published into the cloud.
Any thoughts on what might be happening or what I can do about it?
thanx
class SendChime(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' username = self.request.get("username")
logging.debug("Sending chime for user=" + username) login = username; password = password chime = self.get_chime() payload= {'status' : chime, 'source' : "innertwitter"} payload= urllib.urlencode(payload)
base64string = base64.encodestring('%s:%s' % (login, password)) [:-1] headers = {'Authorization': "Basic %s" % base64string}
url = "http://twitter.com/statuses/update.xml" result = urlfetch.fetch(url, payload=payload, method=urlfetch.POST, headers=headers)
self.response.out.write(result.content)
-- James
------- http://macstrac.blogspot.com/
Open Source Integration http://open.iona.com
-- Johan Carlsson Colliberty Easy Publisher http://www.easypublisher.com
-- Johan Carlsson Colliberty Easy Publisher http://www.easypublisher.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to goog...@googlegroups.com
To unsubscribe from this group, send email to
goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---







