Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

fb_list_ad returning one column as an Object #81

Closed
laziob opened this issue Jan 26, 2018 · 1 comment
Closed

fb_list_ad returning one column as an Object #81

laziob opened this issue Jan 26, 2018 · 1 comment

Comments

@laziob
Copy link

laziob commented Jan 26, 2018

When running this:
fbad_list_ad(statuses = "ACTIVE", fields = c("campaign_id", "adset_id", "name", "creative"))

for some reason it returns a 5 column dataframe (instead of 4, one for each field) and the one with te creative Ids is an object
**
image
**

That fifth column, I dont know what those Ids are for and why are they there.

Any ideas on to how to solve this or why is happening? Thanks!

@daroczig
Copy link
Owner

for some reason it returns a 5 column dataframe (instead of 4, one for each field)

The Ad ids are always returned, that's the 5th column

That fifth column, I dont know what those Ids are for and why are they there.

Forget about that tabular view in RStudio, check the str of the object -- you'll see that it's a list. Also try the simplify=FALSE argument of the function, depending on the fields you are querying, you may have to do some post-processing on what FB returns, it's not always a nice data.frame, but eg nested lists or data frames.

I hope this helps, reopen or you'd need more help regarding the pkg functionality

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants