when i try to update the twitter profile picture, i get the following error:
"the operation couldn't be completed. (kCFErrorDomainCFNetwork error 303.)"
I've only added one line of code to the original source code: (in the share function)
[item setCustomValue:#"anything" forKey:#"profile_update"];
note: everything else is working, tweets and img.ly uploads.
thank you
They've recently patched this. Check out this commit item on github:
https://github.com/openresearch/ShareKit/commit/cdbf2528da12abf8e3c8ce1f52a577f3737b5939
Basically you need to add a check in sendImage to switch between POST and GET based on if it's a "profile_update" request.
Hope that helps!
I don't know if it's related, but this error is often encountered when attempting use an NSMutableURLRequest to send a POST message without first calling [request setHTTPMethod:#"POST"];
Related
I am calling a DELETE request using fetch. But The request is not working. How can i solve this? Please help me!.
Can you try to put the params manual it is looking like you didn't send correct params into the methods (/user/undifined) the undifined mean you didn't send the id for deleting the user
Using push API continuously returns token count should within 1 and 1,000. Please find the API error in the screenshot.
The possible causes of this problem is, you have placed the “token” attribute in wrong place.
Solution:
Please keep your “token” attribute within the “message” object,.
enter image description here
For details, check the following documents:
https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-server-dev-0000001050040110
Your token is outside the message body, "token", "android" should be within the message body.
Please check the sample code here
Also, if you want to use more tokens (>1000), the best method is to invoke the API using App server and send messages in batches.
I have a Facebook application that has been retrieving pictures using the guidance found here: Using Pictures
This has been working up until recently, where now if I retrieve an item picture using the following:
/<id>/picture
I get this response:
{
"error": "Invalid response"
}
Is this a known issue? This has been working up until around this week.
Instead of picture, you should use profile_picture if you want the URL of the pic, just like-
<ID>?fields=profile_picture
Example
And if you want to use the image directly you can use:
http://graph.facebook.com/<ID>/picture
Example: http://graph.facebook.com/Shadowfax.sahil/picture
Using the /ID?fields=picture does not help when you'd like to get an arbitrarily large image. I have experienced Invalid Response when calling /ID/picture in the Graph API and found a solution that fixes it.
Try /ID/picture?redirect=false&width=800. The redirect=false option seems to fix the problem with invalid response from the API.
I created a Facebook app and integrated Credits. However, about every second time I call the credits API, I get the following error:
There Was a Problem Processing Your Payment / Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again later.
Everything on my end looks good. On success, the callback is called 3 times:
payments_get_items
payments_status_update, status "placed"
payments_status_update, status "settled"
When it fails and the above error dialog is shown, I can see that only the first call is performed (payments_get_items).
I can see that the response back to Facebook is the same in both cases:
{ "content":[ { "item_id":"1", "title":"[title]", "description":"[description]", "image_url":"[url]", "product_url":"[url]", "price":30 } ], "method":"payments_get_items" }
Has anyone experienced this or can imagine what the reason for the behaviour is?
Thank you!
Bw
I just had similar issue.
Error message is generic and it doesn't give you exact cause of the problem.
In my case the problem was that my image url was misspelled so check your payments_get_items response very carefully.
Beside checking image url validity also check that length of your title and description is ok.
check "Developers response" section on this url for info on boundaries :
https://developers.facebook.com/docs/payments/callback/#payments_get_items
BTW, I think they mistakenly marked product url as required, however you can put same value as for image url just to be sure.
In my app, I want to share an image to flickr.
I used the libraries provided by flickr. After authorization I call the following method
[self.flickrRequest uploadImageStream:[NSInputStream inputStreamWithData:JPEGData] suggestedFilename:#"Pic 2 Print" MIMEType:#"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys:#"0", #"is_public", nil]];
but I get this error
kUploadImageStep Error Domain=org.lukhnos.ObjectiveFlickr
Code=2147418115 "The operation couldn’t be completed.
(org.lukhnos.ObjectiveFlickr error 2147418115.)
If anyone knows then plz help me.
Thanks in advance.
For me the solution was with the default user agent the lib is using. It seems like Flickr is blocking connections from iOS. When I put a different user agent, HTTPRequest.userAgent = #"hehe"; I got it working.