Simple facebook status update from rails?

Hi,

I'm working on a site where users can update their Twitter and Facebook
status. To do that the users provide the credentials and the status
text.

With Twitter that was piece of cake.

But it looks soooo far from what is required from facebook

Does anyone know what is the simplest way to update the facebook status?
From the rails app (or even from javascript directly).

I just want to set a new status (!!) and hope there is a way where the
username and pass are given together with a new status and that's it.

Sorry this might not belong here but I guess someone went over it
before.
I've seen many posts around about this issue and I wonder is that simple
thing is so overcomplicated as it looks.

Cheers.

have you integrated your project with facebook before you run into
this problem?

if so, it's not so complicated
else, yes it's complicated

here is the way to do so using javascript

if you have integrated your application with facebook previously:
use this method: http://developers.facebook.com/docs/?u=facebook.jslib.FB.Connect.streamPublish
set the attachment, action_links, target_id to null
if u open the link above, u'll find this sentence: " If you specify a
target_id then the post appears on the Wall of the target and not the
user posting the item"
but, if the target_id is null, then it's assumed that the target is
the user him/herself

if you haven't integrated your application with facebook previously:
basically u have to create a facebook application (warning: you would
absolutely need web hosting since facebook requires your application,
even for development purpose, to run on internet, not intranet, let
alone pc)
then u need to initialize the facebook application using this method:
http://developers.facebook.com/docs/?u=facebook.jslib.FB.Facebook.init
then use this method: http://developers.facebook.com/docs/?u=facebook.jslib.FB.Connect.streamPublish
set the attachment, action_links, target_id to null
if u open the link above, u'll find this sentence: " If you specify a
target_id then the post appears on the Wall of the target and not the
user posting the item"
but, if the target_id is null, then it's assumed that the target is
the user him/herself

Hi Fajrian,

Thanks a lot for the pointers. I was just checking some FB connect
examples. I kind of tried to avoid it since I'm not sure how much room
for UI customization there is with FB connect. I'd like to avoid the
boring (IMO) FB theme and buttons. The info you provided is really
helpful.

I've also spend some time doing an adaptation for ruby of the approach
followed here: http://codesnippets.joyent.com/posts/show/1204

Almost there, I guess I'll try both anyway.

Thanks again.

This is something that would catch someones attention.

Yeah mabye from FB :slight_smile:

See the next post:
http://www.nexdot.net/blog/2007/04/20/updating-facebook-status-using-php/

...Facebook has requested that I remove the code from my website...

I could give some pointers once it works.

cheers.

FB @ Fail mode

This is so sad, becau,se if you can’t do directly with code, well, you can write some crawler to log into your account, and update it anyway. Whats the point? they won’t even know.

But sure, drop this group a line when you are done.

[]'s
Rodrigo Dellacqua

Rodrigo Dellacqua wrote:

FB @ Fail mode

This is so sad, becau,se if you can't do directly with code, well, you
can
write some crawler to log into your account, and update it anyway. Whats
the
point? they won't even know.

At a guess, the point is probably that that's a violation of their TOS.

But sure, drop this group a line when you are done.

Sure, violate TOS and see how long your account lasts... :slight_smile:

[]'s
Rodrigo Dellacqua

rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com>
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

--

You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Best,

Their TOS statement;

  • You can’t use any indirect form of accessing our site, because if you do so, you won’t see all the adds we got in our site and we won’t increase our company value from beyond 1.5 bi.

sums it all.

lame.

Rodrigo Dellacqua wrote:

Their TOS statement;

- You can't use any indirect form of accessing our site, because if you
do
so, you won't see all the adds we got in our site and we won't increase
our
company value from beyond 1.5 bi.

sums it all.

lame.

You signed the TOS voluntarily. 'Nuff said.

Best,

Rodrigo Dellacqua wrote:

True =), but ppl only realize they are agaisnt the TOS when its too
late,
who reads that?

I at least skim TOSs before I agree to them, and refer to them if I
think I'm in a gray area. If you don't read the TOS when it's presented
to you, you have no one to blame but yourself.

>
--
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

--

You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Best,

Hi,

I'm not sure if there's actually any issues using the php approach.
In the facebook site itself there is a link to the same approach but
with ruby.
The link points to this:
http://lukaszpelszynski.blogspot.com/2009/09/facebook-rest-api-hackers-way.html

And it can be found here in the FB site:
http://lukaszpelszynski.blogspot.com/2009/09/facebook-rest-api-hackers-way.html

It is just the same thing the php was doing, simulate the browser
actions as if the real user would be using it.

Maybe there's no issues after all.

Cheers.

And it can be found here in the FB site:
http://lukaszpelszynski.blogspot.com/2009/09/facebook-rest-api-hackers-way.html

Sorry wrong link, this was the good one:
http://wiki.developers.facebook.com/index.php/User:Ruby