I'm using Notion API to display a collection of photos in a react app (using graphql).
For that I've created a simple database in notion, with basic informationĀ (title, status, tags, category, photo url).
Everything is fine with my test set of data. I can see it in my react app, in graphql (appolo studio), in Postman and in Notion
But I cannot not access new data recently contributed.
Not in my react app and even not in Postman (I can see only the intial set of data).
I've checked the authorizations, everything is clean.
These new data are available in Notion (I can seeĀ and edit them).
When I (owner of the project) add a new row, the data is available in postman and in the app.
If I copy and paste a row contributed by my friend, the data is not available.
The additional data was provided by a friend of mine, with a guest status in the project.
So my only finding so far is that there is a limitation on data provided by a guest, even if it seems a bit weird.
Are there any known limitations on Notion API due to the status of the contributor ?
Or are there other limitations that could explain these partial results ?
Related
I'm trying to do new development on the FB platform post-Cambridge Analytica. Two days ago - i.e. after the review and restrictions started - I created a new FB app and a new Page. Using the Graph API Explorer, I can call /me/ on my new page when the selected app is the Explorer app:
However, when I use my new app, I get the infamous OAuth error about "non-active apps or apps that have not recently accessed this data":
The page access tokens for the two calls have the same permissions, the defaults Graph API Explorer uses:
I'm aware of this question that deals with the general case of this error: Why does Facebook Graph API say my account is non-active?
However, some of the answers to it hint that either having "a first-party relationship" is what determines if I'm allowed access, or not asking for specific fields; and it seems to be about applications that worked before the drama and stopped working after. My app and page are new, created and admined by my account, I can hardly have a more first-party relationship than that; and I'm not asking any fields that aren't publically available for the page anyway. I've tried publishing and unpublishing the page, as well as having the app be in development or live.
Is there any way to actually start a new FB app before the dust settles? Or does "not active or hasn't recently accessed the data" mean only apps that were live and connected to the given pages before the clampdown can work?
We have Sitecore linked to Dynamics using the Sitecore integration module. Within Dymanics we have a marketing list that contains 1000 users and we have successfully added this list as a role to Sitecore.
However when we look at the number of members in the role within Sitecore only 800 of them are showing. Somewhere between dynamics and Sitecore 200 users are going missing. Has anyone seen this before?
The provider:
Only shows the active marketing lists from CRM
Only shows the marketing lists with the Contact member type.
The provider only shows Contacts entities; it shows neither accounts nor leads from CRM.
I have found there are a lot of issues with caching in the Sitecore CRM module.
I don't know if this has anything to do with your specific issue but I am seeing similar behaviour. For example, if I add a marketing list in Dynamics and view the associated users in that role in Sitecore everything is fine but if I were to go ahead and add new contacts to the marketing list in Dynamics then those new users are not reflected in Sitecore until the cache is cleared (My guess is the IsUserInRoleCache).
I think this is a pretty bad flaw since regular marketing users will probably not know to clear the cache or forget even if they have a way of doing so.
What's even worse is that the same situation occurs when working with users in Sitecore. The profile details for a user are not updated until the cache is cleared (UserProfileCache). I found that this can actually lead to data being overwriten in Dynamics when the two-way (Read-Write) connection is enabled between Sitecore and Dynamics. For example, old data may be displayed for a user in Sitecore if the cache was not cleared and then the old data is sent back to Dynamics on save which overwrites the correct data stored in the CRM. I ended up writing some custom code to get around this issue because I did not feel comfortable moving forward with this issue in place.
Hope this helps even if it's not exactly the cause of your issue.
I want to build a dashboard that returns more customized insights from the insights generated by app.
The app is a facebook connect website that users visit and view a list of products. They can post to facebook about that particular product by sharing a custom story that incorporates that product on their timeline.
When I go to the insights for my app, it does a great job of showing me all social impressions for all custom stories that were generated on my site.
I'd like to narrow that down even more for specific products.
My plan is to record the object ids that are generated by these actions and link them to a partucular product in my database.
I'd then like to create a new dashboard page that will allow me to login, request read_insights permission from me and then use that object_id:product mapping from my database to show how many social impressions where recorded for a given product's object_ids.
Is this possible? I've read alot about it but still haven't found the most elegant way to get a segmented report of social impressions per type of content that was posted.
Thanks for your time.
The implementation all depends on which platform you want your app to run on.
The first major component is you must have a Facebook developers account which is easy to signup for. Just go to developers.facebook.com and register. Takes like 2 mins. After that you will need to create your first app and add the correct domain name where your app will be hosted and what platform it will run on. (iOS, Android, Web, ect.) Once that is finished you can make your app public so you can use the Facebook API in your code.
For the app creation itself. The first thing you need to do is import the correct API for your platform. Which you can find a walk through at https://developers.facebook.com/docs/. Once the API is imported you must build a Facebook object which contains your app id and possibly app secret. If you're using JavaScript you don't want to use the app secret because it will be visible to the public.
Now that you have your Facebook object you must require the app users to log in and grant permission to your app. You can add extended permissions to your log in process by adding a scope value to the log in button generated by Facebook. Here is an example.
<fb:login-button id="loginBtn" max_rows="1" scope="basic_info,read_insights,manage_pages" size="medium" show_faces="false" auto_logout_link="true"></fb:login-button>
After the user is logged in you can now query information from the users account using Facebook Api calls to Social Graph. Facebook also provides a tool to help you figure out what information you can query. https://developers.facebook.com/tools/explorer
Everything else you want to do with the app can be done by Facebook API calls. You just need to insure you grant the user the correct permissions before making the API calls.
API calls are a little different depending on which language syntax you are using but they all follow the same data model and return some array of responses which can be parsed using JSON or the standard array format. The Graph Explorer tool listed above will show you the output for your queries so you can handle them accordingly.
I hope this helps gets you started.
EDITED
Here's the implementation in JavaScript
function getMetric(){
// make the API call
FB.api(
"/{app-id}/insights/application_opengraph_story_impressions",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
}
Here's the reference now that Facebook docs are back up https://developers.facebook.com/docs/graph-api/reference/insights
application_opengraph_story_impressions will probably give you the total impression of all stories made by your app. I ran it against my Facebook app and it came back empty but I don't have any stories so it might work with your's. Also to note in the documentation there is an * by this metric and I could't find what that means.
I'm pretty sure that right now Facebook don't give developers ability to get insights about app custom stories.
Currently Facebook documentation has the following Graph APIs for Insights data:
/{page-id}/insights
/{app-id}/insights
/{domain-id}/insights
/{post-id}/insights (where this is a Page post)
So /{post-id}/insights won't work because custom story is actually user's post and others endpoints don't apply to your case.
As far as I know the only other option to access Insights is FQL. For that you'd use insights table in a manner similar to this:
SELECT ... FROM insights WHERE object_id = ... AND metric = ... AND end_time = ... AND period = ...
Now most likely this also won't work with your custom story posts (I don't have posts which I could try it on right now, so I can't tell) but at least it is not explicitly stated so in the documentation, so you should probably try it out.
UPDATE:
I wasn't able to get any insights data via FQL, although as far as I understand the following code should have gave me at least something (object id is for my page):
SELECT breakdown, end_time, event, metric, object_id, period, value FROM insights WHERE object_id = 224981264214413 and metric = 'page_fans' and period = period('lifetime') and end_time = 1395597892
But it results just in
{
"data": []
}
Facebook also has some pretty old bug report about similar topic: https://developers.facebook.com/x/bugs/508088155954330/ where they confirmed the issue, assigned it, and... did nothing to fix it for 6 months.
In case FQL doesn't work, my suggestion to you is - use your own analytics code to track the creation of custom stories and get the friend count of the users. It won't show you the real exposure of the posts but at least you will see some data on which types of custom stories where posted more often and what was the maximum potential friend count that could have seen them. By the way - to make charting easier, you could use Google Analytics events for that.
I am writing this question after considerable investigation into this matter.
I have gone through Google's easy dashboards (gadash JS library), superProxy and plain analytics API, and couldn't find the best solution for my needs, although I can't believe my needs are so uncommon.
This is why I am turning to you, I have got a feeling I am missing something.
My requirement:
Display my own analytics account data to users on my website, preferably with Google's chart API or ga-dash, to resemble google analytics views as much as possible.
Users will not have to take part in authentication with Google API
Each user has his own query which is built dynamically !! (this is probably why superProxy cannot work for me because I think you need to manually set the queries in advance)
I use django-python as the basis for my website
problems with solutions I tried:
GAdash library - the problem is that each user has to be authenticated, and shown their own data, meaning they need access to my profile- that's simply not what I am looking for. It works great, but only for me. On the other hand if there was a way to make my profile truly public...
superProxy - sounds like a solution for this need exactly, however I don't think that you can programmatically set the queries.
I did find a way to retrieve the data for a query on the server side using my own credential which is a bit hacky, I am still missing that JS library which will parse this XML on the client side and display it as charts.
EDIT:
I ended up using Mark's solution (embeddedanalytics), since I could not find a better, easier solution.
Other alternatives were:
1. superProxy (lacking the ability to dynamically, programmatically loading new queries)
2. gaDash library - requires authentication from each user
3. Implement my own server side querying, and display to the user with some js graphics library - which would require considerable work on my side.
Check out www.embeddedanalytics.com. This is a platform/service which will do exactly what you are looking to do (disclosure - I work with them).
We also support your requirement that each user have its own dynamically built query. This is what we call our CMS Integration version. Are you trying to create a dashboard system for a CMS system you have built?
I am tasked with creating a web form for people to update their details. I have existing data which I need to authenticate users against to make sure we are updating the correct person. I get the feeling that if I code this from scratch I will be reinventing the wheel.
I'm looking either for an online survey solution like SurveyMonkey (but not SurveyMonkey as it does no have automatic authentication) or a web form system that I can install and configure.
Seems like I need to build my own.
I will code in PHP and use a MySQL database. The login screen will take three bits of information, which if found in a record in the database, will show the user a screen with their old data, and a form for updating this data. They enter their new data and hit submit which will put their information into another table in the database.
Nothing to hard but I'd rather use a pre-made system which is already debugged and comes with with some built in tools so the users can manipulate the data.