Hi everyone,
We are unable to create a tweet with an attached media. We tried using different aspect ratios with no luck. The error is not very descriptive, because we are using the same media id sent back to us. Also, it works flawlessly for website cards. Any insight will be greatly appreciated.
Media Request
Request DefaultHttpRequest(chunked: false)
POST /1.1/media/upload.json HTTP/1.1
Host: upload.twitter.com
Content-Type: multipart/form-data; boundary=zQK7qjpDvRQ0JIWN-zwVk-LIgTPFAacDpQc
Authorization: OAuth oauth_consumer_key=âHDgMOrYesLgvwbFl9ZzokSV4Uâ, oauth_nonce=â2635307337803476839â, oauth_signature=â3S19Ks36FbQi%2FSWA1TI%2BjxAnoYE%3Dâ, oauth_signature_method=âHMAC-SHA1â, oauth_timestamp=â1436492216â, oauth_token=â2262086336-Jn8EGzhDg84kdtiwiGcvjEh6mAvW9btgBb5ASQ9â, oauth_version="1.0"
Connection: keep-alive
Accept: /
User-Agent: NING/1.0
Content-Length: 799743
Response DefaultHttpResponse(chunked: false)
HTTP/1.1 200 OK
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
content-disposition: attachment; filename=json.json
content-length: 164
content-type: application/json;charset=utf-8
date: Fri, 10 Jul 2015 01:36:59 GMT
expires: Tue, 31 Mar 1981 05:00:00 GMT
last-modified: Fri, 10 Jul 2015 01:36:59 GMT
pragma: no-cache
server: tsa_a
set-cookie: lang=en; Path=/
set-cookie: guest_id=v1%3A143649221958841024; Domain=.twitter.com; Path=/; Expires=Sun, 09-Jul-2017 01:36:59 UTC
status: 200 OK
strict-transport-security: max-age=631138519
vary: Origin
x-access-level: read-write
x-connection-hash: 5a31993f595ee41fc4064d2666776425
x-frame-options: SAMEORIGIN
x-rate-limit-limit: 415
x-rate-limit-remaining: 409
x-rate-limit-reset: 1436494745
x-response-time: 118
x-transaction: 6a78c5ac78dfe074
x-tsa-request-body-time: 2540
x-twitter-response-tags: BouncerCompliant
x-xss-protection: 1; mode=block
2015-07-09 18:36:59,633 - [DEBUG] - from com.ning.http.client.providers.netty.NettyConnectionsPool in New I/O worker #70
Adding uri: https://upload.twitter.com:443 for channel [id: 0x3ea8527f, /192.168.2.4:57476 => upload.twitter.com/199.59.148.148:443]
2015-07-09 18:36:59,634 - [INFO] - from com.boostable.integration.twitter.service.TwitterAdService$ in play-akka.actor.default-dispatcher-13
200: {âmedia_idâ:619319373254168580,âmedia_id_stringâ:â619319373254168580â,âsizeâ:799466,âexpires_after_secsâ:3600,âimageâ:{âimage_typeâ:âimage/jpegâ,âwâ:1200,âhâ:628}}
Tweet Request
2015-07-09 18:37:02,770 - [INFO] - from com.boostable.integration.twitter.service.TwitterAdService$ in play-akka.actor.default-dispatcher-6
Create Tweet: twurl -H ads-api.twitter.com -d âstatus=Miniature Edge Lit Sign & Base - Buy Now! http://bit.ly/1HR1Trz&media_ids=619319373254168580â /0/accounts/18ce53zhjfq/tweet
Using cached Channel [id: 0x283f5564, /192.168.2.4:57472 => ads-api.twitter.com/199.59.149.200:443]
for request
DefaultHttpRequest(chunked: false)
POST /0/accounts/18ce53zhjfq/tweet HTTP/1.1
Host: ads-api.twitter.com
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Authorization: OAuth oauth_consumer_key=âHDgMOrYesLgvwbFl9ZzokSV4Uâ, oauth_nonce="-7719679248249728098", oauth_signature="%2FvpkvaY%2FZePhr79Bcyw30624PqE%3D", oauth_signature_method=âHMAC-SHA1â, oauth_timestamp=â1436492222â, oauth_token=â18324461-ToirYi5Z7yKPPhFhM88aUAUsvNmE7YUBFmbdfVVWcâ, oauth_version="1.0"
Connection: keep-alive
Accept: /
User-Agent: NING/1.0
Content-Length: 111
2015-07-09 18:37:03,100 - [DEBUG] - from com.ning.http.client.providers.netty.NettyAsyncHttpProvider in New I/O worker #69
Request DefaultHttpRequest(chunked: false)
POST /0/accounts/18ce53zhjfq/tweet HTTP/1.1
Host: ads-api.twitter.com
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Authorization: OAuth oauth_consumer_key=âHDgMOrYesLgvwbFl9ZzokSV4Uâ, oauth_nonce="-7719679248249728098", oauth_signature="%2FvpkvaY%2FZePhr79Bcyw30624PqE%3D", oauth_signature_method=âHMAC-SHA1â, oauth_timestamp=â1436492222â, oauth_token=â18324461-ToirYi5Z7yKPPhFhM88aUAUsvNmE7YUBFmbdfVVWcâ, oauth_version="1.0"
Connection: keep-alive
Accept: /
User-Agent: NING/1.0
Content-Length: 111
Response DefaultHttpResponse(chunked: false)
HTTP/1.1 400 Bad Request
content-disposition: attachment; filename=json.json
content-length: 228
content-type: application/json;charset=utf-8
date: Fri, 10 Jul 2015 01:37:03 GMT
server: tsa_a
set-cookie: guest_id=v1%3A143649222286211833; Domain=.twitter.com; Path=/; Expires=Sun, 09-Jul-2017 01:37:03 UTC
strict-transport-security: max-age=631138519
x-access-level: read-write-directmessages
x-connection-hash: 63fb31c93dcb6ab15725b4c18478fd60
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-rate-limit-limit: 300
x-rate-limit-remaining: 296
x-rate-limit-reset: 1436492265
x-response-time: 313
x-runtime: 0.302202
x-transaction: b763bbab9a03489f
x-tsa-request-body-time: 0
x-xss-protection: 1; mode=block
2015-07-09 18:37:03,101 - [DEBUG] - from com.ning.http.client.providers.netty.NettyConnectionsPool in New I/O worker #69
Adding uri: https://ads-api.twitter.com:443 for channel [id: 0x283f5564, /192.168.2.4:57472 => ads-api.twitter.com/199.59.149.200:443]
2015-07-09 18:37:03,102 - [INFO] - from com.boostable.integration.twitter.service.TwitterAdService$ in play-akka.actor.default-dispatcher-8
400: {âerrorsâ:[{âcodeâ:âINVALID_MEDIAâ,âmessageâ:âInvalid media idsâ}],ârequestâ:{âparamsâ:{âstatusâ:âMiniature Edge Lit Sign & Base - Buy Now! http://bit.ly/1HR1Trz",âmedia_idsâ:[619319373254168580],âaccount_idâ:"18ce53zhjfqâ}}}