GithubHelp home page GithubHelp logo

Comments (5)

andrewgeisler avatar andrewgeisler commented on September 4, 2024

@diegocgaona
Can you try adding the argument version = 2.3 to the request and see if that works?

from rfacebook.

diegocgaona avatar diegocgaona commented on September 4, 2024

@andrewgeisler , I tried, but the results are the same (I tried other versions too)

teste <- getInsights(object_id = "1522614931338640", token = fb_oauth, metric = c('page_views_external_referrals'), 
                     period = c('day'),version = 2.3, parms= paste0("&since=", last_month_s, "&until=", fblast_month_e))
Error in data.frame(unlist(x$data[[1]]$values[[i]]$value), end_time = x$data[[1]]$values[[i]]$end_time,  : 
  arguments imply differing number of rows: 0, 1

from rfacebook.

andrewgeisler avatar andrewgeisler commented on September 4, 2024

@diegocgaona Interesting. I'm not entirely sure what the problem is. The following works just fine for me. I have access to this this particular page (kcId below is a page id) and the token is a long lived token I use continually. I'm also using Rfacebook_0.6.3 which is installed from github not CRAN. Is the object id you're sending a page id? What happens if you generate a temp token from the API explorer and use that?

test <- getInsights(object_id=kcId, token=token, metric=c('page_views_external_referrals'),period=c('day'), parms='&since=2016-03-01&until=2016-03-31', version = 2.3)

It looks like your error is happening when it tries to parse the response... which means the structure or the response is something that it isn't expecting. That could happen if the credentials are right, or there's a request is bad (metric / period mismatch). All of the arguments look fine to me so barring using an old version of Rfacebook, I'm thinking it may be an object type problem or an authentication issue with the token. Let me know if a temp token works.

from rfacebook.

diegocgaona avatar diegocgaona commented on September 4, 2024

Hi @andrewgeisler
Sorry by my stupidity, works with the temporary token. I updated to 0.6.4 too. (I didn't need the version = 2.3 param). And yes, the id is from a page which I'm a admin.

But... it's strange, all the other queries worked fine with my oauth,
Do you know what can be the error in my permanent token or where I can change it to work?

Many thanks for your help!

from rfacebook.

andrewgeisler avatar andrewgeisler commented on September 4, 2024

@diegocgaona Sorry for my absence! Did you get this figured out? I don't personally use the oauth method to authenticate so I'm not sure how to help you further. Was your oauth created with extended permissions? Did you try redoing the oauth authentication process?

from rfacebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.