I am trying to run a system call which will post an activity to a user on facebook.
When I run this on the command line, everything works fine but on my RoR controller, I don’t get any result. I have all the permissions required to post an activity for a user and I’ve already tried using system(), backticks(`), exec() and %x but still no luck.
Any idea on this? here’s my code:
post = "curl -F 'access_token=#{session[:access_token]}' -F 'achievement=https://example.com/main/fbobject' 'https://graph.facebook.com/me/app_fb:send'"
system(post)
It’s working fine now. For references, here’s the solution.
On the server settings under directives,
I have:
and added:
I’ve included
:/usr/bin/and:/usr/bin/libsince curl command is located there.