0

I am using PHP SDK for using UE API UE in my PHP laravel project. I have createduser and connection successfully and getting right json.But When I am trying to send message using below code I get 403 forbidden error:

    $options = array(
        "receivers" => array(
            array(
                "name"=> "Me"
            )
        ),
        "message"=>array(
            "subject"=>"test",
            "body"=> "ABC",
            "image"=>"http://politibits.blogs.tuscaloosanews.com/files/2010/07/sanford_big_dummy_navy_shirt.jpg",
            "link"=>array(
                "uri"=> "http://google.com",
                "description"=> "link desc",
                "title"=>"link title"
            )
        )
    );

    //Send the message and get their uris
    $uris = $connection->send_message($options); 

Please suggest some solution.

Always_a_learner
  • 4,585
  • 13
  • 63
  • 112

1 Answers1

0

The access token might have expired. Please reconnect the facebook connection again or refresh the connection.

The facebook access tokens have a lifetime of about two hours. For longer lived web apps, especially server side, need to generate long lived tokens. Long lived tokens generally lasts about 60 days.

AMT.in
  • 391
  • 1
  • 5