Comments (5)
@diegocgaona
Can you try adding the argument version = 2.3 to the request and see if that works?
from rfacebook.
@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.
@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.
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.
@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)
- Error in fbOAuth() HOT 14
- getPost error differing number of rows: 0, 1 HOT 3
- NA in from_id and from_name HOT 2
- Search for only English pages HOT 1
- (#190) This method must be called with a Page Access Token HOT 8
- Unable to retrieve likes and commenter names/ids using getPost() HOT 1
- New Group posts on Facebook differs from retrieved getGroup data
- Would it be possible to add a getPublishedPosts function?
- Possible to add a getVideos() function?
- http://localhost:1410/ no longer supported by Facebook API HOT 10
- getPost doesn't return likes object HOT 1
- GetPage returning zero results for public pages HOT 1
- How is the package impacted by the new changes? HOT 1
- getPost() throws error HOT 1
- So API 3.0 and rFacebook HOT 7
- HELP
- searchPages returns error HOT 2
- is this package working with new FB policies? HOT 10
- can't use CallAPI
- Error "type field is deprecated for versions v3.3 and higher" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rfacebook.