Home ruby facebook sdk filter lead objects
Reply: 0

ruby facebook sdk filter lead objects

user690
1#
user690 Published in August 15, 2018, 5:37 am

Im using the following GEM https://github.com/facebook/facebook-ruby-ads-sdk Im trying to filter the Leads object to only bring back todays leads but nothing is working.

@session = FacebookAds::Session.new(access_token: u.facebook_credential.token,
    app_secret: 'XXXXXXXXXXXX’)

@ad_account = FacebookAds::AdAccount.get("XXXXXXXXXX",'name',@session)

@leads = @ad_account.leadgen_forms(fields: 'name, leads', filtering: {
    field: 'created_time',
    operator: 'GREATER_THAN',
    value: Time.now.to_i
})

Im getting json error when I call this. do I need to create the filtering as a special Filter object or just as a json object?

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO