Error while uploading image to flickr in iphone(Xcode 4.2) - iphone

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.

Related

ref=ts on facebook app url cause app not found error

I've create an facebook app and it run smoothly at
https://apps.facebook.com/icoloringstar/
But the problem is: when I search my app name "icoloring star" in facebook, it link to the app at url:
https://apps.facebook.com/icoloringstar/?fb_source=search&ref=ts
Then facebook said that:
App "iColoring Star" is unavailable
The app "iColoring Star" is temporarily unavailable due to an issue with its third-party developer. We are investigating the situation and apologize for any inconvenience.
We found that url part "ref=ts" cause above problem, but really do not know why?
Could you explain me why and how to resolve this problem?
Thank you very much.
It sounds like your code is failing when the ref parameter is supplied in the request path.
I was able to repro this with any arbitrary value in the ref parameter when accessing your app
Check your server logs and and see if you're returning a 500 error to facebook when the request comes in
See if you have any code that parses a ref parameter and check it's not throwing exceptions
Make sure your callback URL in the app settings doesn't also specify a ref parameter or your app may receive two values and/or fail entirely
It means 'Top Search'. User enter a query into the top of search.
There are some ref parameters.. ref=bookmarks for example. I dont know the full list.
Did you put your app on Facebook App Center?

API Error Code: 191 (using ASP.Net)

Guys here is my configuration for my facebook app, please tell me if I'm missing anything:
Basic Info-------------
App Namespace: footygo
App Domain: footygo.com
Website----------------
Site URL: http://www.footygo.com
App on Facebook-------
Canvas URL: http://www.footygo.com/canvas/
Secure Canvas URL: https://www.footygo.com/canvas/
Canvas Page: http://apps.facebook.com/footygo
My application contains a folder named Canvas/ which contains all the facebook pages. The Canvas folder contains two files at the moment, namely: Default.aspx and Setup.aspx
Within my web.config file, I have set the following information:
PostAuthorizeRedirectURL="Setup.aspx"
I also tried varying with PostAuthorizeRedirectURL="Canvas/Setup.aspx" to no avail.
I am consistently getting the following error message:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
What is the issue? Do you guys have any ideas? This is my first facebook app, and it's not working out as I thought it would :(
Thank you for your time and patience, and sorry if this question has already been posted numerous times. I went through most (but not all) of the 191 error questions but couldn't find anything of value.
Please let me know if you have any idea about what's going on. My release date is less than 24 hours away!
Humble Regards,
Rowan R.
You need to use the full URL. The redirect_uri must be within the same domain name as what is listed in the settings in Facebook.
PostAuthorizeRedirectURL="http://www.footygo.com/canvas/Setup.aspx"
Thanks for your reply Adam!
However I figured out what was wrong and got it to work! It wasn't the PostAuthorizeRedirectURL, it was actually the URL I was using to access my app!
I was accessing my app using https://apps.facebook.com/xxxxxxxxx where xxxxxxx is my app's id. That did not work (at first). I then tried accessing my app using it's app name, i.e. https://apps.facebook.com/xyz and it worked!
All I can say is... the facebook platform sucks.

MobClix error for iPhone -503?

I have integrated MobClix to my app, the test adds are working correctly before entering my MobClix application ID, after giving actual MobClix ID i am getting below error.
( I have checked my MobClix applicationID, and also i have enabled only 320*50 add i used the same in code they are correct) Dont know why i am getting this error.
Error Domain=com.mobclix.ads Code=-503 "The operation couldn’t be completed. (com.mobclix.ads error -503.)"
Try following the steps here. If that still doesn't work, submit a support ticket and we can take a look into your account.

ShareKit twitter profile picture update error

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"];

facebook chat on the iphone using xmppframework

Well i started of by following all the instructions here:
http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo
I used the recommended fork of the facebook api and tried the latest from:
https://github.com/facebook/facebook-ios-sdk/
My problem starts with the following error:
< failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">< not-authorized/></failure>
The error is a reply from facebook to xmppframework s response to a authentication challenge. The response that is made by the iphone is base64 encoded msg when i decode it i find 2 of the values are null:
api_key=(null)
and the
session_key=(null)
This is obviously the reason facebook is returning that error. But the problem i have is i cant seem to find any where to set these values in the framework. Besides i think the session_key should be pulled in from facebook anyway.
I guess what i want to know is a couple of things.
Has any one got the xmppframework working with facebook on a iDevice?
If you have got it working did you have to stray from the path of the instructions on http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo ?
do you know of any other method to get facebook chat working on the iphone?
Any suggestions or help for my current dilemma would be appreciated. Happy to share my code if you want.
cheers
I wrote the Facebook integration for XMPPFramework. The api_key and session_key, come from a call to auth.PromoteSession. Facebook is trying to deprecate that call, so to enable it, you must follow step 7, in the HowTo:
Under Migrations, change Disable Deprecated Auth Methods from Enabled to Disabled and Save Changes.