How to reply private message with facebook api

I've managed to do a reading of the data on the facebook page private message me. Then I want to reply to the sender but failed.

My app permission : manage_pages, read_page_mailboxes

My code :

require '../src/facebook.php'; $facebook = new Facebook(array( 'appId' => '339554932xxxxxx', 'secret' => 'zzz334534123xx', )); $pages = $facebook->api('/me/accounts'); foreach ($pages['data'] as $page) { $page_access_token = $page['access_token']; } $MsgRep = "This is a reply message..."; $MID = "m_mid.1393481292907:f67352f5dfd39b5e42"; $facebook->api('/'.$MID.'/messages', 'POST', array('message' =>$MsgRep, 'access_token' => $page_access_token)); echo "Message Sent";

The result: But I just get a blank screen. without echo "Message Sent"

Is there something wrong with my code?

Thanks

Category:php Views:0 Time:2014-02-27

Related post

  • Sending private messages through Facebook API 2010-12-06

    Possible Duplicate: Facebook Api - send private messages to friends I know that it is not officially possible to send private messages through FB API. Every thread in SO says so too. But I was using RockMelt browser and when you invite somebody, a pr

  • How to send private messages in Facebook inbox 2011-03-25

    Possible Duplicate: Facebook Api - send messages to friends I wanted to post a private messages from my Facebook APP but I have no Idea. How to send private messages in Facebook inbox through Graph API ? --------------Solutions------------- Unfortuna

  • Send private messages and Facebook whitelist 2011-09-28

    My iOS application already posts on walls, gets users inbox, online presence, and more. But I am trying to send private messages to Facebook friends from my app. I read that Facebook does not allow to sending messages to prevent spam, but I have seen

  • Send Message using Facebook API attaching an App Link 2012-01-14

    I need to send a Facebook new message using Facebook PHP sdk or Javascript sdk. This message should be attached a link for a Facebook app. please check this image, Then you can understand about what I exactly want. Please anyone can help me? --------

  • How to send private message to facebook user using java 2012-02-15

    I want to send private message to my friends on facebook using java. I have already searched enough on Google about this. It seems earlier it was not possible but it is possible as i have seen this on many sites. I also have read enough posts on stac

  • How does the sharing feature on Dropbox allow you to send private messages to Facebook friends? 2012-04-26

    I am trying to implement something similar to the share feature on Dropbox that allows you to send an invite to Facebook friends. https://www.dropbox.com/share You will need to log in/ create an account and have a shared folder to see it. The feature

  • Sending private messages using Twitter API 2011-07-09

    Is it possible to send a private message (formerly called direct message) using the Twitter PHP API?. I can't find any documentation on how to do this - i.e. how to send a private message to a single user. --------------Solutions------------- POST di

  • Is there a product that provides private messaging ala Facebook Messages/Twitter DMs? 2012-03-22

    My web app needs a private messaging system just like Facebook Messages or Twitter DM. I found a bunch of stuff that does real-time instant messaging, but they don't store the messages like a typical PM system does. Plenty of sites/apps has a PM feat

  • How to send private message/access facebook chat in Koala ,Ruby on Rails 2012-03-27

    how to use Koala gem to access user chat and send message to the another user? Is that Koala has provide this function to use? i did check the documentation about koala ,but seems like dont have it,or it do have any alternative way to do it? Any sugg

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.175 (s). 11 q(s)