Howdy All,

I am part of an open-source media tools development group. Among other
applications, we're developing a GNOME-based photo organizer and would
like to use the Moblin librest library to connect to the Facebook web
API so that our users will be able to upload their photos to Facebook.
In our effort, we've run into two problems, which I'll describe below.
Any help resolving either of these two issues (or pointing toward
forums, blog posts, or other documentation containing a resolution)
would be very kindly appreciated.

1. Multi-part encoding support for HTTP POST requests on REST endpoints

I read through all the librest documentation that I could find, and
was unable to find any way to make librest's RestProxyCall objects
encode their calls as multi-part form submissions. Furthermore, I've
looked at how RestProxyCall is actually implemented in the librest
source code, and it appears that when the time comes to assemble the
actual HTTP POST request, librest simply calls the
soup_form_request_new_from_hash( ) function in libsoup. As I
understand it,  soup_form_request_new_from_hash( ) prepares only a
standard, single-part HTTP form request, not a multi-part request
(from looking at the libsoup documentation, it appears that the
equivalent form request creation function for multi-part forms is
soup_form_request_new_from_multipart()). My group really needs
multi-part POST support, because the photos.upload method of the
Facebook API relies on it. Since multi-part encoding appears to be the
accepted way of pushing large binary objects (like photos) to RESTful
web services, it seems like an important feature for a REST client
library. So does librest support multi-part encoding now, and, if not,
is it likely to in the future?

2. Facebook Connect-style session secret support in FacebookProxy objects

Since early 2009, Facebook recommends that desktop applications
connecting to their API use the new Facebook Connect identity service
to do authentication and obtain per-session permissions. One
consequence of using the Facebook Connect API is that application
secrets are now deprecated in favor of more limited (and secure)
“session secrets,” that are returned when a new session is obtained.
>From what I can see, librest's FacebookProxy class has no support for
session secrets today (e.g., facebook_proxy_new_with_session( ) takes
an application secret as an argument, not a session secret). So, are
there any plans to add session secret support to librest in the
future? That question asked, it looks to me like application secrets
and session secrets are used in exactly the same way when digitally
signing facebook API requests, so I surmise that it might be possible
to just pass  facebook_proxy_new_with_session( ) a session secret
instead of an application secret and to have it still work. Has anyone
had any success with this approach?

I thank you in advance for your help and wish you all the best.

Lucas
_______________________________________________
Moblin dev Mailing List
dev@moblin.org

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org 
once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to