JaroslavTulach: /* Publish Your RSS Too! */ - 2010-11-16 19:43:42

Publish Your RSS Too!

←Older revision Revision as of 19:43, 16 November 2010
Line 41: Line 41:
=== Publish Your [[RSS]] Too! ===
=== Publish Your [[RSS]] Too! ===
-
If you are interested, you can use the same application to publish your [[blogs]] too. In contrast with common server side [[facebook]] applications, you don't need to share with me any secrets, you don't need to publish any keys. Just:
+
If you are interested, you can use the same application to publish your [[blogs]] too. In contrast with common server side [[facebook]] applications, you don't need to share with me any secrets, you don't need to publish any keys, grant any permissions to applications you don't control. Just:
# Download '''Feedbook-X.Y.jar''' from http://hudson.apidesign.org/hudson/job/feedbook or compile the sources yourself
# Download '''Feedbook-X.Y.jar''' from http://hudson.apidesign.org/hudson/job/feedbook or compile the sources yourself

JaroslavTulach: /* Facebook Desktop Application */ - 2010-11-16 19:40:40

Facebook Desktop Application

←Older revision Revision as of 19:40, 16 November 2010
Line 5: Line 5:
I can't help myself, as a founder of [[NetBeans]] I still feel like a desktop guy. As a result I wanted to access [[Facebook]] from my desktop application. Actually, I'd even wanted to create an application that can run headless, on a server. I wanted to create a [[RSS]] feed publisher. An application that can read [[Blogs|my blog]] entries and post them up on my [[facebook]] page.
I can't help myself, as a founder of [[NetBeans]] I still feel like a desktop guy. As a result I wanted to access [[Facebook]] from my desktop application. Actually, I'd even wanted to create an application that can run headless, on a server. I wanted to create a [[RSS]] feed publisher. An application that can read [[Blogs|my blog]] entries and post them up on my [[facebook]] page.
-
This is not easy. Desktop applications are not the primary target of [[facebook]] and it is hard to find [[good]] tutorial, even harder to find some that are modestly up to date. However I made it work. If you want to make your application work too, here is the howto. I am sure it is not perfect, however please note that this is a [[wikipedia:mediawiki|wiki page]]. Everyone can make it better. If you know better way to do some of the tasks, feel free to update the [[Facebook|page]].
+
This is not easy. Desktop applications are not the primary target of [[facebook]] and it is hard to find [[good]] tutorials, even harder to find some that are modestly up to date. However I made it work. If you want to make your application work too, here is the howto. I am sure it is not perfect, however please note that this is a [[wikipedia:mediawiki|wiki page]]. Everyone can make it better. If you know better way to do some of the tasks, feel free to update the [[Facebook|page]].
==== Register ====
==== Register ====

JaroslavTulach: /* Publish Your RSS Too! */ - 2010-11-16 19:39:27

Publish Your RSS Too!

←Older revision Revision as of 19:39, 16 November 2010
Line 60: Line 60:
<comments/>
<comments/>
-
 
-
[[TBD]]
 
-
 
-
# Builds, downloads:
 

JaroslavTulach at 19:39, 16 November 2010 - 2010-11-16 19:39:13

←Older revision Revision as of 19:39, 16 November 2010
Line 44: Line 44:
# Download '''Feedbook-X.Y.jar''' from http://hudson.apidesign.org/hudson/job/feedbook or compile the sources yourself
# Download '''Feedbook-X.Y.jar''' from http://hudson.apidesign.org/hudson/job/feedbook or compile the sources yourself
-
#
+
# Register new personal application at http://www.facebook.com/developers/createapp.php (you can choose any values you want, probably)
 +
# Run '''Feedbook''' with the obtained application key, secret and pointer to your blog feed:
 +
 
 +
<source lang="bash">
 +
$ java -jar Feedbook-X.Y.jar app_key app_secret feed_url
 +
</source>
 +
 
 +
Work with the opened browsers, press enter to move the application forward. All your [[blogs]] will be written to your wall. Next time you want to publish new [[blogs]], just run:
 +
 
 +
<source lang="bash">
 +
$ java -jar Feedbook-X.Y.jar
 +
</source>
 +
 
 +
it will use the same parameters and before and publish only newer, not yet published [[blogs]]. Enjoy [[Facebook]] from desktop!
 +
 
 +
<comments/>
[[TBD]]
[[TBD]]
# Builds, downloads:
# Builds, downloads:

JaroslavTulach: /* Login */ - 2010-11-16 19:34:33

Login

←Older revision Revision as of 19:34, 16 November 2010
Line 26: Line 26:
Alas, I don't know how to login using pure [[REST]] [[API]]s. As such I have to open a browser and let the user login manually. I'd rather prefer to login in a headless mode, but seeking the Internet did not help me at all to find a way to do it.
Alas, I don't know how to login using pure [[REST]] [[API]]s. As such I have to open a browser and let the user login manually. I'd rather prefer to login in a headless mode, but seeking the Internet did not help me at all to find a way to do it.
 +
 +
==== Permissions ====
 +
 +
To post on your wall, your application needs a permission. You can use [[REST]] [[API]] to find out whether you have a permission or not. If you however want the user to grant you additional rights, the simplest thing is to open a browser once again:
 +
 +
<source lang="java" snippet="feedbook-permission"/>
 +
 +
With appropriate permissions it is then piece of case to post anything on your wall:
 +
 +
<source lang="java" snippet="feedbook-publish-link"/>
 +
 +
The code is not complex, but it took me few days to find all the glitches and eliminate paths that lead nowhere. If I could eliminate the need to open browser, I think my [[RSS]] '''Feedbook''' application would be perfect.
 +
 +
=== Publish Your [[RSS]] Too! ===
 +
 +
If you are interested, you can use the same application to publish your [[blogs]] too. In contrast with common server side [[facebook]] applications, you don't need to share with me any secrets, you don't need to publish any keys. Just:
 +
 +
# Download '''Feedbook-X.Y.jar''' from http://hudson.apidesign.org/hudson/job/feedbook or compile the sources yourself
 +
#
[[TBD]]
[[TBD]]
-
# Builds, downloads: http://hudson.apidesign.org/hudson/job/feedbook
+
# Builds, downloads:

JaroslavTulach: /* Facebook Desktop Application */ - 2010-11-16 19:25:36

Facebook Desktop Application

←Older revision Revision as of 19:25, 16 November 2010
Line 3: Line 3:
=== [[Facebook]] Desktop Application ===
=== [[Facebook]] Desktop Application ===
-
I can't help myself, as a founder of [[NetBeans]] I still feel like a desktop guys. As a result I wanted to access [[Facebook]] from my desktop application. Actually, I'd even wanted to create an application that can run headless, on a server. I wanted to create a [[RSS]] feed publisher. An application that can read [[Blogs|my blog]] entries and post them up on my [[facebook]] page.
+
I can't help myself, as a founder of [[NetBeans]] I still feel like a desktop guy. As a result I wanted to access [[Facebook]] from my desktop application. Actually, I'd even wanted to create an application that can run headless, on a server. I wanted to create a [[RSS]] feed publisher. An application that can read [[Blogs|my blog]] entries and post them up on my [[facebook]] page.
-
This is not easy. Desktop applications are not the primary target of [[facebook]] and it is hard to find good tutorial, even harder to find some that are modestly up to date. However I made it work. If you want to make your application work too, here is the howto. I am sure it is not perfect, however please note that this is a [[wikipedia:mediawiki|wiki page]]. Everyone can make it better. If you know better way to do some of the tasks, feel free to update the page.
+
This is not easy. Desktop applications are not the primary target of [[facebook]] and it is hard to find [[good]] tutorial, even harder to find some that are modestly up to date. However I made it work. If you want to make your application work too, here is the howto. I am sure it is not perfect, however please note that this is a [[wikipedia:mediawiki|wiki page]]. Everyone can make it better. If you know better way to do some of the tasks, feel free to update the [[Facebook|page]].
==== Register ====
==== Register ====
-
The first step is to register at http://www.facebook.com/developers/createapp.php and obtain your application key and secret. It does not matter much what values you put in the registration form. None are important as far as I can tell.
+
The first step is to register at http://www.facebook.com/developers/createapp.php and obtain your application's key and secret. It does not matter much what values you put in the registration form. None are important as far as I can tell.
==== Login ====
==== Login ====
-
Having your key and secret you can start writing your application. Sources of mine ''feedbook'' are available in a [[Hg]] repository: http://source.apidesign.org/hg/feedbook/, you can use:
+
Having your key and secret you can start writing your application. Sources of mine ''feedbook'' are available in a [[Hg]] repository at http://source.apidesign.org/hg/feedbook/, you can use:
<source lang="bash">
<source lang="bash">

JaroslavTulach: /* Facebook Desktop Application */ - 2010-11-11 22:18:59

Facebook Desktop Application

←Older revision Revision as of 22:18, 11 November 2010
Line 3: Line 3:
=== [[Facebook]] Desktop Application ===
=== [[Facebook]] Desktop Application ===
-
[[TBD]]
+
I can't help myself, as a founder of [[NetBeans]] I still feel like a desktop guys. As a result I wanted to access [[Facebook]] from my desktop application. Actually, I'd even wanted to create an application that can run headless, on a server. I wanted to create a [[RSS]] feed publisher. An application that can read [[Blogs|my blog]] entries and post them up on my [[facebook]] page.
-
# Register your application at http://www.facebook.com/developers/createapp.php
+
This is not easy. Desktop applications are not the primary target of [[facebook]] and it is hard to find good tutorial, even harder to find some that are modestly up to date. However I made it work. If you want to make your application work too, here is the howto. I am sure it is not perfect, however please note that this is a [[wikipedia:mediawiki|wiki page]]. Everyone can make it better. If you know better way to do some of the tasks, feel free to update the page.
-
# Sources: http://source.apidesign.org/hg/feedbook/
+
 
-
# Builds, downloads: http://hudson.apidesign.org/hudson/job/feedbook
+
==== Register ====
 +
 
 +
The first step is to register at http://www.facebook.com/developers/createapp.php and obtain your application key and secret. It does not matter much what values you put in the registration form. None are important as far as I can tell.
 +
 
 +
==== Login ====
 +
 
 +
Having your key and secret you can start writing your application. Sources of mine ''feedbook'' are available in a [[Hg]] repository: http://source.apidesign.org/hg/feedbook/, you can use:
 +
 
 +
<source lang="bash">
 +
$ hg clone http://source.apidesign.org/hg/feedbook/
 +
$ cd feedbook
 +
$ mvn install
 +
</source>
 +
 
 +
to get them and compile them. First thing to do is to login and obtain a session ID:
<source lang="java" snippet="feedbook-login"/>
<source lang="java" snippet="feedbook-login"/>
 +
 +
Alas, I don't know how to login using pure [[REST]] [[API]]s. As such I have to open a browser and let the user login manually. I'd rather prefer to login in a headless mode, but seeking the Internet did not help me at all to find a way to do it.
 +
 +
[[TBD]]
 +
 +
# Builds, downloads: http://hudson.apidesign.org/hudson/job/feedbook

JaroslavTulach at 08:52, 11 November 2010 - 2010-11-11 08:52:23

←Older revision Revision as of 08:52, 11 November 2010
Line 1: Line 1:
 +
While ago I got a question from a curious to-become-reader of [[TheAPIBook]] whether, after reading it, he will be able to create [[API]] for a Web OS like [[wikipedia:Facebook|Facebook]]. I had to admit that my book could help only indirectly. Some principles apply, but the main focus is on libraries, while [[Facebook]] is more about [[REST]] [[API]]s. Anyway, modernity cannot be prevented, so I am slowly deep diving into this slightly different world too.
 +
 +
=== [[Facebook]] Desktop Application ===
 +
[[TBD]]
[[TBD]]
 +
# Register your application at http://www.facebook.com/developers/createapp.php
 +
# Sources: http://source.apidesign.org/hg/feedbook/
 +
# Builds, downloads: http://hudson.apidesign.org/hudson/job/feedbook
-
Register your application at http://www.facebook.com/developers/createapp.php
+
<source lang="java" snippet="feedbook-login"/>
-
Sources: http://source.apidesign.org/hg/feedbook/
+
-
Builds, downloads: http://hudson.apidesign.org/hudson/job/feedbook
+

JaroslavTulach at 22:31, 10 November 2010 - 2010-11-10 22:31:22

←Older revision Revision as of 22:31, 10 November 2010
Line 3: Line 3:
Register your application at http://www.facebook.com/developers/createapp.php
Register your application at http://www.facebook.com/developers/createapp.php
 +
Sources: http://source.apidesign.org/hg/feedbook/
 +
Builds, downloads: http://hudson.apidesign.org/hudson/job/feedbook

JaroslavTulach: New page: TBD Register your application at http://www.facebook.com/developers/createapp.php - 2010-11-10 22:12:55

New page: TBD Register your application at http://www.facebook.com/developers/createapp.php

New page

[[TBD]]


Register your application at http://www.facebook.com/developers/createapp.php