I'm posting a video to a Facebook profile using the iOS SDK, and it works okey. But when I try to use the same code, and post the native video to a Facebook Page, it fails with the following error:
(#200) App does not have permission to post to target
I'm using the right URL (https://graph-video.facebook.com/pageID/videos) and also I have replaced the user session token, with the Page token.
In fact, posting a photo works okey. But not a video.
What does it mean that "the app does not have permission to post to target"? Should I use a special permission in order to post a video on a page?
Thanks!
There is a bug in the Facebook's video upload code, which hasn't been fixed yet. You can track the updates on this bug using this link.
Related
I'm new to the site and new to developing so I'm looking for some general advice here.
I'm looking to build and app which works along side Instagram. So this is what I want to be able to do to start with.
User opens app and can submit an already posted (and held on Instagram) photo to the app. The user at this point will need to be asked to log into their Instagram account. So for example they would select submit and it will open a window asking them to log into Instagram and then it will display all their available photos which they have posted.
User selects the post they wish to submit to the app.
Image displays on app in a gallery of submitted posts by all the other users for people to see.
Thats the basic premise. It's actually a lot more involved than that but I am learning and trying to keep it simple at the moment.
What I would like to know is. Is this possible, are there any guides which exist on how to do this.
What sort of process will I be looking at here. I've tried looking for posts on Instagram integration etc but I can't find anything similar to this.
Thanks in advance any help or pointers on where to even start will be helpful.
error instagramdemo
Stpes to integrate instagram:
1)https://www.instagram.com/developer/
You would have to create an application on the instagram developer portal, get a client ID for performing OAuth flow.
2)Ask your users to login to the instagram app and get the auth_token from instagram API.
3) Use the auth_token in all your requests basically.
4) Download code from here: https://www.sendspace.com/file/mnuqck
and replace your clientid in my code. you will get response in code.
These libraries should help you get started,
https://github.com/shyambhat/InstagramKit
https://github.com/crino/instagram-ios-sdk
You would have to create an application on the instagram developer
portal, get a client ID for performing OAuth flow.
Ask your users to login to the instagram app and get the auth_token
from instagram API.
Use the auth_token in all your requests basically.
The whole flow would have been implemented for you in the libraries I mentioned.
Say for example if you are using InstagramKit and after integrating/authorisation by the user getting images from the users feed would be as simple as below,
InstagramEngine *engine = [InstagramEngine sharedEngine];
[engine getSelfFeedWithSuccess:^(NSArray *media, InstagramPaginationInfo *paginationInfo) {
// media is an array of InstagramMedia objects
...
} failure:^(NSError *error, NSInteger statusCode) {
...
}];
Steps to get InstagramKit up an running,
Download the InstagramKit from github.
Make sure you have cocoapods installed on your mac, refer
https://cocoapods.org/ for help.
Open the InstagramKit-Example on terminal and run the following
command,
pod install
Wait for the pod to finish its magic.
Now you should have InstagramKit-Example.xcworkspace created in the InstagramKit-Example, open it and run.
I just did it now,
Our iphone app allows for sign in via Foursquare via oauth. It was working fine and recently stopped working.
The error we get is: Connecting Failure: Callback uri is not valid for this consumer.
HOWEVER, if the user does not have the foursquare app installed on their phone it works fine as before. It seems as if FS is now doing a redirect to handle the oauth inside the FS app and this fails when attempting to return to the originating application. Via safari it seems to work.
This is on ios 9.
Solutions?? Thanks!
We've changed to use a SafariViewController and this seems to force Foursquare to not to this strange in-app redirect, solving the issue. This is also Apple's preferred oauth method, so probably the way to go.
Still seems like a problem on the Foursquare side that they may want to address for others however. I'm closing this question. Thanks.
Where does your redirect URL point? If you want it to launch your app after completion you should point to the iTunes store (pre-iOS9) link for your app or the universal link (iOS9 onwards).
More information on redirects for the native foursquare app is available in the README here: https://github.com/foursquare/foursquare-ios-oauth/
How to create a universal link in iOS9 https://www.appsflyer.com/blog/how-to-set-up-ios-9-universal-links-for-your-app/
A callback url is a webpage loaded after your web app has been
verified. In this case, you need to specify a page for to send data to
after authentication
Double check your Foursquare credentials and update the callback uri to a valid link. Tutorial link
Please follow the below points, may be one resolves your issue:-
Enter the callback in foursquare account in addcallback methods. Then in your code add the call back to the provider before you authorize. (Reference here).
You're getting that error because the URL you're pointing your users to (foursquare.com/oauth2/...) includes a redirect_uri parameter that doesn't match with what you configured in your app's settings under https://foursquare.com/developers/apps. Make sure these match!
My application having twitter login and post twit on twitter. so i am using FHSTwitterEngine github demo.
i am successfully login using FHSTwitterEngine. But facing problem to twit post on twitter.
At the time of twit , i am getting this error in my device “Twitter NSURLErrorDomain Code=-1012”.
Ao pls any one can give me solution for twit post using FHSTwitterEngine
And original demo is also not working for me in my device. original demo also give same error “Twitter NSURLErrorDomain Code=-1012”
Link of github demo : “https://github.com/alvani/FHSTwitterEngine”
Error code -1012 is kCFURLErrorUserCancelledAuthentication. This should mean that some code somewhere called [sender cancelAuthenticationChallenge:] in response to an authentication challenge. This is likely code inside of DMTwitterOAuth, but it's also possible it's Apple's own code inside the URL-loading system. If you're trying to post a tweet you'll likely need Read and Write access.
I'm attempting to hook my application into Flickr but having issues during the Authentication process.
I've followed instructions in:
https://github.com/devedup/FlickrKit
I've created a CFBundleURLTypes for my application (let's call it myapp://) and tested that it works (i.e. I type myapp:// in a safari). I've successfully called the authentication URL in Flickr, it shows the login, asks the user to grant my app the necessary permissions then instead of redirecting back to my app via my URL...it does nothing, and the app is not authenticated.
I used FlickrKit demo app replacing its api key/secret/CFbundleUrltypes with mines and the issue is the same, so the problem is not in the code but rather in the way i registered my app in flickr. Said that...I just followed the instructions in Flickr "Edit Authentication Flow" so I guess the issue is with the callback url I put in flickr. I used myapp://auth? as described in many posts in the internet but does not authenticate or call back my app.
This is not the same issue reported here:
Flickr Authentication Flow and iPhone
but rather similar to the unanswered post:
flickr callback URL not working
The Info.plist for the custom URL handler and the AppDelegate code are a copy&paste from the flickrKit demo app [no need to reinvent the wheel] and anyway even after changing api key secret and url in flickrKit demo app with mines...the app is not called back, so it must be something wrong in my app registration.
Anybody experienced a similar behavior ? i ruled out objective-c code and callback url as the issue, so what is left is the flickr part but not sure where to look for help... so i wrote this post.
Thanks for any tip,
dom
Probably this is a problem of api signature calculation. All the parameters passed via method should be used to calculate an api signature.
In my iOS app i am using Vimeo api, when i tried to add comment to a video it is giving a error saying that the user needs write permission, read permission is granted.
previously i used the following url for authorization
http://vimeo.com/oauth/authorize
I changed it to
http://vimeo.com/oauth/authorize?permission=write
The problem still persists, is the authorization url ok or do i have to give any other parameters. I am using OAConsumer library for OAuth.
After some trail and errors , i got the solution.
instead of specifying permissions=write in the url, we have to give it as a additional parameter using set parameters method of OAMutableRequest.