Facebook in a Mac App - objective-c

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/

Related

New version import.io cannot create API

I have a number of APIs both authenticated and not authenticated, created in earlier versions of import.io.
With the new Windows app I can't create an API, or at least pick one up. The tutorial shows a whole bunch of options, but I only get "CONFIGURE" and "EXPORT". "Configure" only gives me the option of single URL, bulk extract and URLs from another API. But there is no link to give me the API address.
Similarly, EXPORT only provides "USE IN DATA SET".
I asked their support but got this:
Hi Glenn,
Thank you for reaching out.
As you may noticed, we made some changes to our interface.
We moved the into the Export tab (next to configure) and named it
simple API integration.
Let me know if you have any questions.
Thank you,
But when I replied that I don't have that option, I got no reply.
What am I doing wrong?
Glenn.
Import.io support got back t me after I sent a screen video (http://www.evernote.com/l/AAhMJsy7INVHFauEOGFQBgEgJq2IPRSA6AU/). There's a bug in the new Windows desktop app that prevents authenticated APIs from showing.

Can you create Google Forms from Google Docs in an application?

I am thinking about app that will use google form and I need to create forms from that app. Is there a way how can I create form in google docs without using website but through some api or some other way?
I can offer an idea for a solution using Google App Script.
Since the beginning of 2013 you can create new forms using the App Script Forms Service API quite easily.
var form = FormApp.create(title)
.setDescription(description)
.setConfirmationMessage('Thanks for responding!')
;
The problem now is how to get that App Script running from your non App Script code.
You can use App Script to create a Web App that reacts to HTTP GET requests.
So putting it together, you may be able to create an App Script Web App that reacts to a GET request and when it gets the right URL parameters, it creates the form.
(Nov 2020) Yes, it is possible to programmatically create Google Forms. You can do it with Google Apps Script using its Forms service. You can also extend the code to read in the contents from Google Docs (with Apps Script's Document service) and use it for the creation of Google Forms.
I created a Google Workspace (formerly G Suite) Add-on, which you can think of as a Google Docs extension, called GFormIt. Its original purpose was intended for teachers to write exams/quizzes, possibly with answers, in Google Docs, then automatically convert them to Google Forms to distribute to students who submit their answers into Google Sheets (the destination for Google Forms submissions).
Furthermore, if you (the teacher) provided answers to your test questions, GFormIt would also auto-submit your answers to the Sheet as if you were a student. If you do that, and use a tool like Flubaroo to grade the exam, you could designate your row in the Sheet as “the answer key.” You can learn more about how it works, including viewing a short video, at the GFormIt page linked above.
This Google Docs add-on, along with others for Google Docs, Sheets, Slides, Forms, etc., are all certified/validated by Google and available for free to anyone from the Google Workspace Marketplace. (However, your admins may have to grant permissions for you to try to install them to your corporate Workspace account.) If interested in building your own add-on, please see the developer documentation and perhaps some of my introductory videos to get started, the most relevant being the one linked to at the top of this answer.
Apps Script is a serverless Google technology, meaning you write your code (using JavaScript) in the browser, and it is hosted by & executed on Google servers. If you wanted to create your own web app (and hosted anywhere), you would have to wait for a Google Forms REST API which does not exist at the time of this writing. (If we ever launch one, you'll find its documentation at https://developers.google.com/forms along with the others like Sheets https://developers.google.com/sheets, Gmail https://developers.google.com/gmail, Drive https://developers.google.com/drive, etc.)
Earlier this year (Mar 2022) the new Google Forms Api graduated from Beta. It is more powerful that the previous versions and caters for two main use cases:
Automated form creation and editing: Enables automated form creation
and editing. Enables rapid form generation from large volume question
banks or other data backends.
Reaction to Form responses: The API also enables developers to build
automations for acting on incoming responses. Examples include
developing real-time dashboards or visualizations and triggering
business workflows based on response data.
We have used it to build an integration that Creates documents and slides each time a form is completed: www.portant.co/google-forms-to-docs and it works really well.
I think the other key use case looks like it would be a good fit for you and others looking for a solution like this.
Cheers, James
Sorry, the API doesn't support programmatically creating forms.

How to create a Web Intent service for my own site?

Twitter offers 'web intents' that are an alternative to OAuth access to their API. Basically, this provides a less feature rich experience, but can still be quite handy. User clicks on 3rd parts websites can create popup windows that check whether the user is logged in to twitter and if they are, allows them to us some Twitter features such as tweeting, retweeting, or following users.
My question is, how could I go about implementing an API like this? Are there tutorials or libraries? I'm not sure what technologie(s) power web intents or where I should start searching.
Thanks.
You can read more about web intents at webintents.org and read the W3C's draft spec. As far as I know, web intents are still somewhat of a new beast on the web and they have not been standardized.
Still, you may want to read this blog which contains a few examples of registering web intents and check out Paul Kinlan's git repo https://github.com/PaulKinlan/WebIntents
Hope that helps you get started.

Upload Image to Facebook Objective-C

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.

Does Facebook have some sort of API that I can make a client?

For example...I would like to make a "client". First, people post to my client, and then to Facebook.
(I want to make a client so that I can store posts)
Facebook has a number of APIs, including ones which will allow you to do the thing you describe. The term "posts" is a little vague since that covers a number of things on Facebook, but as an example there is the Status.Set API Call you can be used to update a user's status.
A useful place to start would be the Facebook Developer Wiki.
You should try "Google" before posting a question. There's a portal for developing applications on Facebook called...
Facebook Developers
By client API, I assume you wanted a "Desktop" client, if so you probably wanted the...
Facebook Server API
...which you can use to add a post/comment, for example.
If your are targeting a .NET environment (ASP.NET, Silverlight, WM, ...) you should take a look to this toolkit: http://facebooktoolkit.codeplex.com/