Home facebook sdk api and nativeoffers
Reply: 0

facebook sdk api and nativeoffers

user1027 Published in August 16, 2018, 6:16 am

I have problem with creating facebook page offer. It return ID of post, but i can not find it on facebook. I found information only here: https://developers.facebook.com/docs/graph-api/reference/native-offer/ But when i creating it on facebook, it require a photo. Photo url is not included in source

$params = array(
'location_type' => 'both',
'discounts' => array(
        'type' => 'percentage_off',
        'text' => 'the text description for this offer',
        'value1' => 20,

'redemption_link' => 'www.link.com',
'redemption_code' => 'happysummer2016',
'details' => 'the details for this specific offer',
'expiration_time' => (new \DateTime("+10 day"))->getTimestamp(),

foreach ($pages as $key) {
if ($key['name'] == 'name') {
    $post = $fb->post('/' . $key['id'] . '/nativeoffers', $params, $key['access_token']);
    $post = $post->getGraphNode()->asArray();
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.406055 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO