views:

1469

answers:

5

Can anyone help me to send message to facebook friends using graph api.

I tried

$response = $facebook->call_api("/me/feed", "post", "to=john","message=You have a Test message");

It's not working. I have the accesstoken of the user in my hand.only I am confused on sending process.

kindly reply

A: 

i am facing the same problem. i think there is some sort of permission missing, for performing ne kind of write operations

try with this. It ddnt work for me, might help u:

curl -F 'access_token=your_token' -F 'message=This is a test post' https://graph.facebook.com/senders_id/feed

Hasan
A: 
$attachment =  array(

    'access_token' => $access_token,
    'message' => "$msg",
    'name' => "$name",
    'link' => "$link",
    'description' => "$desc",
);

facebook->api('/'.$uesr_id.'/feed', 'POST', $attachment);
mwafi
A: 
You can use
HTTP POST with
PATH
https://graph.facebook.com/friend_facebook_id/feed
PARAMETER
MESSAGE = your message
ACCESS_TOKEN = your oauth2 access token
gkrdvl
A: 

Hi, I am facing the same problem. https://graph.facebook.com/friend_facebook_id/feed is for publishing to friend's wall. It's not for sending a private message

hitustc
A: 

You can't send messages using a Facebook application. You used to be able to do that, but the (predictable?) colossal amount of abuse led to the revocation of this ability.

Provided Alice, your user, has given you the necessary extended permissions, you have the following options:

  • Post to Alice's wall on her behalf
  • Send email to Alice
  • Create events on behalf of Alice
    • invite Bob (not your user) to said events
  • Issue a request/invitation on behalf of Alice to Bob
Júlio Santos