I'm currently trying to upload an image from my Mac application to Facebook. To do this, I'd like for the user to simply input his username and password, and to click a button.
The only issue is, Facebook doesn't actually have an API for the Mac, it only has one for iOS. This shouldn't be a problem, except for the fact that to login, you must use a web view, something I'm not to keen on doing, since I'd like the interface to be two simple text fields.
I've also looked into PHFacebook, a class I found online, but it also seems to utilize an NSWebView.
I'm wondering if there's a security issue when you use text fields; indeed, it's slightly strange no available API offers this function !
So, to conclude, is it possible, or is there an API, that lets you upload an image and lets you provide the user's credentials through simple NSStrings?
There's a Cocoa framework called MKAbeFook that lets you access Facebook APIs. I don't know if it's up to date, but you should give it a try.
It looks like this is not supported unless you can embed a web browser.
If you scroll to the bottom of: facebook authentication docs, it seems to say this.
Embedding a web browser is generally doable, but may be overkill for what you are trying to do.
Good luck!
You could do this through JSON on your mac app but I think the way Facebook protocols work you simply provide the image to upload and then the user logs into their Facebook account through a webview and has to authorize it.
Related
I have 0.0% experience with the Twitter API.
However, I was wondering, if it's possible, using this API or some other method, to have my Header or Background change everytime someone reloaded my Twitter page,
https://twitter.com/Otanan
My goal, or ideal method is someone just loads my Bio and it randomly selects an Image from a folder I have somewhere, or whatever
I don't think this is possible. The Twitter APIs, as they currently stand, seem to be designed for someone to change the page from a non-twitter application. Twitter won't let people run executable code in other people's browsers as it would open the gateway to huge numbers of viruses.
So, no, it isn't possible
I can't seem to find any documentation or reference on upload and sharing images on Google+.
Is this action current supported in google+?
Their moment sharing seems to accept thumbnail url, but I don't want to keep the image hosted on my site once it is created and shared by visitor.
You have a few different options, but I'm not sure any of them are really what you're looking for.
Google+ doesn't really allow outside apps to upload and share something automatically.
As you've observed, the closest you can get is generating a Moment for them to share. And while there are similarities to Instant Upload, it isn't identical. You could probably use a data url to encode and store the image as part of the moment, but I haven't tested this.
Another alternative is to use the Google Drive API to store the image in their Drive space, permit the image to be read publicly, get a link for it, and use this link as the thumbnail URL. Similarly, you might be able to use the Picasa Web Albums Data API to store the image. Both have good, but different, integration with Google+. The former is more modern, while the latter has more features that are tailored for images.
Is it possible to have the user "like" your page during the registration process using the Facebook Registration/log in function on my website. I know you can have custom fields, but I don't see anything that talks about this. Please tell me where I can find this information. I don't want to be repetitive on my website by having them do this twice.
Authenticating an application is not the same as liking an application. So they are two distinct things. You can create something called a fan-gate to prevent the user from seeing the good stuff if they don't like your app. Google fan-gate and you will see some examples of how to implement.
how would I integrate Facebook into my Mac Application. I could give Objective-C a bit of a go, but it's going to be in an AppleScript-Objective-C project.
I could.. update the user's status a bit better instead of just opening their web browser and pointing them to "Facebook.com" , I could make my own interface that interacts with Facebook.
Any ideas?
You can interact with the Facebook API in many different ways, including submitting status updates as a POST request to the graph api. Their examples aren't at all language-specific. They demonstrate how to interact with it using curl on the command line, for instance.
Docs are here: http://developers.facebook.com/docs/
EDIT: Laziness IS one of the Three Virtues of the Programmer, but dude.... Clicking a link is too hard? Well, okay:
Here's how you authenticate your applications and get added as an application for a user:
http://developers.facebook.com/docs/authentication/desktop
Then here's how to work the Graph api. The section you want is "Publishing" most of the way down the page:
http://developers.facebook.com/docs/api/
Has anyone been able to set who can view a private video on YouTube using the API?
The API isn't designed for this, so it's either very difficult or impossible.
You can only share a private video with 25 of your friends, so you have to first be friends with them, then give them access, which means the api would have to do all of these actions and once you hit 25 people you'd have to stop anyway.
You should probably use a different service or make your own if you want private videos.
Well you could try to load the FLV to your own website. Do a login system and use flowplayer to show it.
I've worked with the YouTube API which is pretty nice and works very smooth with jQuery and Ajax - but as the others have already mentioned there is no built-in feature for that.
You could probably find some sort of work-around as you could integrate you own authentication and login capabilites - but obviously that would not prevent your users not being able to watch the "restricted" video.