Home facebook sdk api and nativeoffers
Reply: 1

facebook sdk api and nativeoffers

Pavel Chuck Severa
Pavel Chuck Severa Published in 2018-02-12 21:14:59Z

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();
Patrick Lambe
Patrick Lambe Reply to 2018-02-13 10:10:17Z

A "native offer" is not visible on a Facebook page, you need to make a "native offer view". The native offer is the rules that govern the offer, the native offer view is the visible component that users interact with. More here https://developers.facebook.com/docs/graph-api/reference/native-offer/

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO