[twitter-dev] Posting Status Update with PHP

2010-10-29 Thread sdenike
Am I missing something along the lines of how the message should be
encoded when posted to Twitter?  I have tried urlencode, add slashes,
strip slashes etc etc and no matter what I try when I post something
like It's it will end up on twitter as It\'s  Please advise. Thanks

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: PHP, Curl an OAuth Echo errors

2010-09-29 Thread sdenike
Hmm Does not seem to be working no matter which way I construct it,
keep getting the Could not authenticate error.  Any suggestions?

On Sep 14, 2:02 am, Tom van der Woerdt i...@tvdw.eu wrote:
 I don't have an example, but you should use the X-Auth-Service-Provider
 header for the URL and X-Verify-Credentials-Authorization for the
 Authorization: header. If you use these, it should be fine.

 Tom

 On 9/14/10 2:03 AM, sdenike wrote:



  I have been trying for weeks here to get this going and cant seem to
  figure this out.  I am trying to create a simple PHP/MySQL image
  uploader much like that of twitpic, yfrog etc etc to host my images on
  my own server.  I am using the iPhone twitter app and have created a
  custom end point on my server, it handles the uploads fine.  After
  shooting some emails back with twitter support I was told to look into
  the twitter oauth echo command to get such information like username
  etc etc from that tweet.  To do so my understanding is that the iPhone
  twitter app sends header information to my script. my script should
  then take that header information as well as my consumer key and send
  that request back to twitter.

  That header that I create should include:
  X-Auth-Service-Provider:https://api.twitter.com/1/account/verify_credentials.json
  X-Verify-Credentials-Authorization OAuth oauth_consumer_key=...,
  oauth_token=..., oauth_signature_method=...,
  oauth_signature=..., oauth_timestamp=..., oauth_nonce=...,
  oauth_version=...

  I am sending all this information back with curl in my php script and
  keep getting the following sent back to me
  {request:/1/account/verify_credentials.json,error:Could not
  authenticate you.}

  Does anyone have a working example as I am not finding any PHP code
  that clearly outlines this whole statement, I cant imagine it being
  that hard thats why its bothering me that it has taken this long to
  figure out.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] PHP, Curl an OAuth Echo errors

2010-09-13 Thread sdenike
I have been trying for weeks here to get this going and cant seem to
figure this out.  I am trying to create a simple PHP/MySQL image
uploader much like that of twitpic, yfrog etc etc to host my images on
my own server.  I am using the iPhone twitter app and have created a
custom end point on my server, it handles the uploads fine.  After
shooting some emails back with twitter support I was told to look into
the twitter oauth echo command to get such information like username
etc etc from that tweet.  To do so my understanding is that the iPhone
twitter app sends header information to my script. my script should
then take that header information as well as my consumer key and send
that request back to twitter.

That header that I create should include:
X-Auth-Service-Provider: 
https://api.twitter.com/1/account/verify_credentials.json
X-Verify-Credentials-Authorization OAuth oauth_consumer_key=...,
oauth_token=..., oauth_signature_method=...,
oauth_signature=..., oauth_timestamp=..., oauth_nonce=...,
oauth_version=...

I am sending all this information back with curl in my php script and
keep getting the following sent back to me
{request:/1/account/verify_credentials.json,error:Could not
authenticate you.}

Does anyone have a working example as I am not finding any PHP code
that clearly outlines this whole statement, I cant imagine it being
that hard thats why its bothering me that it has taken this long to
figure out.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Re: Request Token Failure

2010-09-13 Thread sdenike
Hey Tom,

I think I am falling into this pitfall myself.  I don't have the users
information only the information that the iPhone twitter app sends me
for posting an image on a custom end point.  With that header
information they send should be enough to send back to twitter to get
the user information? Or am I not understanding the process of doing
this?

Thanks,
Shelby

On Sep 10, 4:18 pm, Tom van der Woerdt i...@tvdw.eu wrote:
 You don't need request_token for Echo - unless you don't have the user's
 credentials yet, but in that case you aren't using OAuth Echo.

 Tom

 On 9/11/10 1:13 AM, AS_Drone wrote:



  We have been trying to implement the OAuth Echo method, but cannot get
  a request-token. It returns with Failed to validate oauth signature
  and token.

  Below is our Post data. Our signature aligns with data on the API
  document. Any thoughts as to why we fail to oauth signature?

  Post data:

  Request Header:
  POST /oauth/request_token HTTP/1.1
  Content-Type: application/x-www-form-urlencoded
  Authorization:
  OAuth oauth_nonce=QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk,
  oauth_signature_method=HMAC-SHA1, oauth_timestamp=1272323042,
  oauth_consumer_key=XX,
  oauth_signature=Sr%2FKoecPb7D%2FnZNxt4qoM517Xjs%3D,
  oauth_version=1.0
  Host: api.twitter.com
  Content-Length: 0
  Connection: Keep-Alive
  Cache-Control: no-cache
  Cookie: k=12.22.61.130.1283734903045073; guest_id=128373490305755705;
  __utma=43838368.1906297211.1283734907.1283734907.1283762670.2;
  __utmz=43838368.1283734907.1.1.utmcsr=(direct)|utmccn=(direct)|
  utmcmd=(n
  one); __utmv=43838368.lang%3A%20en; __qca=P0-1782216308-1283735015637;
  __utmb=43838368.3.10.1283762670
  Response Header:
  HTTP/1.1 401 Unauthorized
  Date: Mon, 06 Sep 2010 09:13:15 GMT
  Server: hi
  Status: 401 Unauthorized
  X-Transaction: 1283764395-39211-63478
  Last-Modified: Mon, 06 Sep 2010 09:13:15 GMT
  X-Runtime: 0.00573
  Content-Type: text/html; charset=utf-8
  Content-Length: 44
  Pragma: no-cache
  X-Revision: DEV
  Expires: Tue, 31 Mar 1981 05:00:00 GMT
  Cache-Control: no-cache, no-store, must-revalidate, pre-check=0,
  post-check=0
  Set-Cookie:
  _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCKEfUuYqAToHaWQiJWVhY2RjNDQ3NGNmMm
  Mw%250ANjUwYWIzMGE3OWE4NDNlZTM3IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
  %250A
  OjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--
  c7925282fe8f92e14b1a250c09ddff
  e386a925be; domain=.twitter.com; path=/
  Vary: Accept-Encoding
  Connection: close
  Failed to validate oauth signature and token

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Re: oauth echo php sample

2010-09-02 Thread sdenike
This is the header I am sending.

X-Verify-Credentials-Authorization: OAuth realm=http://
api.twitter.com,  oauth_consumer_key=KEY,  oauth_token=TOKEN,
oauth_signature_method=HMAC-SHA1,  oauth_signature=SIG,
oauth_timestamp=1283409844,  oauth_nonce=NONCE,
oauth_version=1.0 X-Auth-Service-Provide:
https://api.twitter.com/1/account/verify_credentials.json

I am getting all the information that I am sending back from using the
PHP getallheaders(); function and parsing out aspects of it.  When I
send that header via curl I am constantly getting

{request:/1/account/verify_credentials.json,error:Could not
authenticate you.}

I have even tested with a simple REST plugin for chrome, which always
prompts for a username/password combo. Given what I am trying to do
this will not be possible to send a user/password as that is
essentially what I am trying to get sent back to me via twitter.  Can
anyone lend some insight on how I can get authed in to obtain the user
information?  Thanks



On Sep 1, 5:02 pm, sdenike den...@gmail.com wrote:
 Does anyone have a sample header that should be sent back to twitter
 as well as maybe the curl commands?  I have been trying to construct a
 header to send back to twitter using OAuth echo, but have not been
 successful in doing so.  And example would be excellent if anyone is
 able to provide.  Thanks

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Re: oauth echo php sample

2010-09-02 Thread sdenike
Hey Taylor,

I guess maybe I am unclear on how to properly achieve what I am trying
to do, hence why I am having so many issues.  I know its been done
time and time again, but I am looking to create a service for me and
my friends that will act like a twitpic.  All of us have iPhones so we
are all using the Twitter app.  Since the image upload request is sent
to my server I am gathering that I have to grab the HTTP headers so I
can get the X-Verify-Credentials-Authorization information.  From
there my understanding was that I had to use something like CURL to
send a header containing much of that information back to Twitter so
that I could get the information stored in the
https://api.twitter.com/1/account/verify_credentials.json which would
allow me to store information about the photo in my database eg screen
name of who uploaded it and geo ip if avail etc..  I have read over
the api wiki information and its not clear on how to get from start to
finish on this.  Thats the information I am looking for.  The main
page of my app works fine which physically allows people to login to
twittter via Abrahams twitter libs but since the iPhone twitter app
does not send the token secret etc I cant get the
verify_credentials.json.  Thanks again for any help on this.

On Sep 2, 8:52 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hey there,

 I'm not sure if I completely understand where you might be going wrong.

 With these requests you are trying to OAuth Echo -- are you executing them
 against Twitter before you try to execute them through the Echo step? If so,
 the act of executing a request against Twitter will invalidate the
 re-attempted request by Echoing client.

  Have you validated whether the credentials being passed to your through the
 Echo'd request are actually correct? (a) is the access token valid and
 active, (b) is the consumer key valid and active, (c) is the user suspended?

 Taylor



 On Thu, Sep 2, 2010 at 8:37 AM, Marsh Gardiner ma...@apigee.com wrote:
  Not sure how much this would help you, but you can see any header that
  has been sent via Apigee's test console via the request tab.

 http://app.apigee.com/console/twitter

  If there's more information you'd like to see in there, do let us
  know, as we're always working to improve the test console.

  Marsh

  On Sep 1, 8:02 pm, sdenike den...@gmail.com wrote:
   Does anyone have a sample header that should be sent back to twitter
   as well as maybe the curl commands?  I have been trying to construct a
   header to send back to twitter using OAuth echo, but have not been
   successful in doing so.  And example would be excellent if anyone is
   able to provide.  Thanks

  --
  Twitter developer documentation and resources:http://dev.twitter.com/doc
  API updates via Twitter:http://twitter.com/twitterapi
  Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
  Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk?hl=en

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Twitter OAuth Echo and PHP

2010-09-01 Thread sdenike
I am looking for some help, I am grabbing the full headers from a
request sent by the iPhone twitter app to my PHP application.  I am
looking to grab the username, and well all avail content from
https://api.twitter.com/1/account/verify_credentials.json ... I was
told OAuth Echo would be the route to take.  I am just not clear on
how to send the request back to Twitter.  I have tried a dozen or so
Curl options and also tried to use Abrahams OAuth functions and always
get the following Could not authenticate you response back.  Can any
assist me on how the headers should be sent back to get a correct
response?  thanks a million in advance.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] oauth echo php sample

2010-09-01 Thread sdenike
Does anyone have a sample header that should be sent back to twitter
as well as maybe the curl commands?  I have been trying to construct a
header to send back to twitter using OAuth echo, but have not been
successful in doing so.  And example would be excellent if anyone is
able to provide.  Thanks

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en