Posting Video from IOS app to Users Facebook Wall - ios

Im very new to Xcode and i'm trying to create a somewhat Social Networking app. At this point i'm not looking for it to be its own app but I want the app to have the ability to let the User sign into their Facebook Account and than Post a Video from the Camera Roll to their wall. I know it sounds simple but Ive look and all i can get are extremely confusing answers that don't make any sense.
Thanks in Advance.
Looking for
1 allow Facebook Login
2) Post Video from Camera Roll to their facebook.
If possible It would be cool to have a thumbnail of the video before they post it. Kind of like instagram. Thanks!

First off, you need to create an app for your iOS app on Facebook. Then use the tokens or keys they provide you with, in order for your app to be able to do anything with Facebook.
Facebook has pretty good instructions on how to set up Facebook login on your app. You can find detailed, step-by-step instructions here. Depending on what type of login you need, you can choose a suitable option.
I have not posted actually files so far onto a Facebook feed/wall. But I have set up sharing of posts. You can find instructions for that here.
Hope this helps.

Related

Swift: How to post to Twitter from iOS app with certain hashtag?

I'm fairly new to posting to social media via Swift in an iOS app but need to be able to post an image to Twitter under a certain hashtag (i.e the user's image is always posted under this certain hashtag regardless).
So far, my app can take a picture and access the user's photo library, but I have run into some trouble implementing post to Twitter.
I have looked at the following questions: Post on twitter from ios app
How to make an ios app post to twitter
But most of the links referenced are either gone or outdated. I have also looked into Sharekit (http://getsharekit.com) as this would do the posting to Twitter automatically it seems, however Sharekit is deprecated.
Ideally, I would like the user to be able to take their photo (I have this) give it a caption, etc WITHIN THE APP then when they press a button it more or less "silently" posts to Twitter WITH the hashtag that I will have set in the app. I am unsure as to how to accomplish this.
What is the best way/approach to posting an image to Twitter via Swift? The hashtag bit seems to be the more difficult step - how can I "force" a hashtag on the user's post?
What you're probably looking for is the Social framework and SLComposeViewController.
Using the setInitialText(_:) method you can add text to the tweet, though this doesn't really force anything, as the user still has the possibility to edit the tweet before publishing, and it doesn't really work "silently" either.
Posting an image is done with the addImage(_:) method.

facebook sharing image with link ios xcode

In my application now I am sharing an image along with a separate website link. I want to attach a link to the image so that on clicking the image, it will direct the user to the respective website.In android it is possible.
Now I am using a social framework. It can be done by using Facebook SDK I guess. Any suggestion on how to do this? Have anyone already did this? please help me with the code. Thank you in advance.
I have searched for this one. I came across graph story and all..which one to use? I am not getting any idea. I am not having enough time to spend.
Have a look at this stackoverflow question: How to Post to Facebook on iOS 6 in Objective-C using ACAccountStore class
But in essence you need to use the iOS Accounts and Social framework to post to Facebook or Twitter.
You can then use it to post images, text, links, hashtags and more.

How do I use Facebook Login via Facebook App for iOS

I have a little problem. I am sing Facebook's API to get users information. I am using the code that provide here: https://github.com/pedro1993/ios-howtos
In those examples, when somebody logs in with Facebook they are taken to the Facebook app, whereas when in my app, Facebook is opened in a UIWebView. How can I stop that from happening and use the Facebook app?
Here is an example:
Peter
Follow this official tutorial instead https://developers.facebook.com/docs/facebook-login/ios/v2.0
Update Facebook SDK has several fallback behaviors to try before it falls back to in-app web view. You can debug it by setting breakpoints in corresponding places in code. From the look of it https://github.com/facebook/facebook-ios-sdk/blob/296771f5ed7674fcbed9c31cf39bf9c8e4706403/src/Login/FBSession.m#L1039 seems like a good place to start.
Especially try to debug -[FBSessionAppSwitchingLoginStategy tryPerformAuthorizeWithParams:session:logger:.

Initiate Facebook Group Chat from iOS App

I want my app to create a new Facebook group chat with certain people that opens either on Facebook's site in Safari or in the native Facebook app when the user presses a button. I want Facebook to handle the whole chat and my app only to initiate it somehow in the cleanest and least involved way possible. My app already uses the Facebook SDK to open an active FBSession, so I've already got login credentials.
Looking around online and in Facebook's docs, I can't find anything that suits my needs. The closest thing I found was in this answer containing a list of Facebook app URLs you can connect to that open the Facebook app to certain pages. There's "fb://chat/(initWithUID:)" and "fb://messaging/compose/(initWithUID:)". However, not only is there no explanation on how to use these, but people say that Facebook has changed these URLs (and does not have any documentation on them), so they don't work anymore unless I reverse-engineer new URLs (which could change again). Ugh, so close!
I also found examples on starting chats with the Facebook Chat API, but that involves logging into Facebook using some networking framework then writing my own GUI and model for sending messages, which I am only prepared to do as a last resort. There should be some way to let the Facebook app or website do all that. Does anyone know how I can do this?
I've found something very close, but I still don't see a way to make my app initialize it with the desired group of friends:
The Facebook SDK has a message dialog that can appear for sending messages to friends. This isn't exactly what I wanted but is good enough because it means that all the programming is already done for me by Facebook, and users should be able to see these messages on https://facebook.com and the Facebook apps. https://developers.facebook.com/docs/ios/share#message-dialog

Sharekit and Facebook URL sharing

I know there is a lot of these questions here, but Facebook seem to change their system now and then.
Is it possible to use Sharekit to send a URL to the status of the user (obviously with their permission) telling others about the app and with the URL for the app?
Every time I try to implement this I just end up in Facebook full on. Can't even get back to my own app with a cancel button. I have followed several suggestions all over the Net with no success.
Would love to have the Facebook Share come up as a actionsheet within the app.
Does anyone have a solution?

Resources