I want to create facebook stream through wowza rest api

$url = "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testraj/pushpublish/mapentries";

		$json = '{
				  "entryName": "fb-api",
				  "profile": "rtmp-facebook",
				  "sourceStreamName": "{myStream}",
				  "facebook.title": "Live Test",
				  "facebook.destType": "timeline",
				  "facebook.destId": "{1302290983210981}",
				  "facebook.destName": "My Timeline",
				  "facebook.description": "This is Wowza live test",
				  "facebook.accessToken": "{ENC-d6741567e7a1b857-4d3b90ce849aa1ceec738be2953cf9380ebb4e20cbe5f1c57334fb6eab495dbcab7259ceb24989b906fa95bcba0041dd8ef129f41862cd970d79c18f64fd6f80acc2147e37a42a599f9547790db5016a5ce3330f4c0257631b829aea1c2107b20e93a58e2b65b93e7398686e0630d6ad37d3ef367b8b1a0dc35bc07afbc90f6dcef4aa1f2224056cda321979fd725cd9ea7dd2a5a4e398d943dbab5c2789e6fc5eb8232f84143c4a9bbf197663c0323dbda6e4a9827ace5b93d923680f5087202a0ca9fbee4ac502a39010a2f29f0919d40e3af059ff439ab58a4b345c3f4bd490c1321e9b4b1d366e0562fe4f81f7f3}",
				  "facebook.privacy": "onlyMe",
				  "extraOptions": {
				    "destinationName": "facebook"
				  },
				  "enabled": true
				}';

		$ch = curl_init($url);                                                     
		curl_setopt($ch, CURLOPT_POST, true);                                     
		curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
		curl_setopt($ch, CURLOPT_HEADER      ,0);  
		curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);
		curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
		 // curl_setopt($ch, CURLOPT_USERPWD, "user:pass");                                                            
		 // curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);             
		curl_setopt($ch, CURLOPT_HTTPHEADER, array(
		                    'Accept:application/json; charset=utf-8',
		                    'Content-type:application/json; charset=utf-8',
		                    'Content-Length: '.strlen($json)));
		$contents = curl_exec($ch); 
		curl_close($ch);

		$obj =  json_decode($contents);
		echo "<pre>";
		print_r($obj);

This code is working am getting response successfully but video is not pushed in wowza  stream engine and also video is not live in facebook
plz help me  

(
    [success] => 1
    [message] => Saved
    [data] => 
)

You need to acquire a Facebook access token for any live feed that uses their API. The Facebook access token that is used by Wowza Streaming Engine is populated by Wowza Streaming Engine Manager when you initially login into your Facebook account via the Wowza Streaming Engine Manager UI. That token is generated by passing an API call to Facebook’s API. This API call includes the Manager application ID as required by the Facebook API.

In order to create Facebook stream targets via REST API you will need to have your own method of obtaining these access tokens. Once you have the access token, you can then query the Facebook Live API for the RTMP streaming entry point. Once you have the RTMP URL, you can then use our REST API to create a generic RTMP stream target, setting the host address and other parameters to point to the RTMP URL obtained from Facebook Live API.

Additional information regarding the Facebook live API can be found in the article below.

https://developers.facebook.com/docs/videos/live-video/production-broadcasts

hi @Kevin Moore Thank you for your reply i am using same way to generate the generic rtmp but the problem is once you publish stream it will go live at facebook but it won’t go live at facebook for second time yo need to regenerate the rtmp and update it in publish map.

I have done so at unpublish event i am refreshing rtmp but that cause some video cut at facebook.

Hi Shoaib,

I am also trying to Live Stream from Wowza Streaming Engine to Facebook through Rest API, but I am facing problem in making Login to FB after the target is created because of this I am not getting stream in my FB account.

What is facebook.accesstoken and facebook.destID and How/Where you got it?

Do I need to change any settings in facebook developer account after creating the App?

Can you please explain me how you achieved this?

This is my E-mail Id : yali.vigneshwaran@gmail.com