Could not edit few fields of page using Facebook Graph API - javascript

I can able to update the page profile info using Graph API with manage_pages permission and as a manager of the page. But I am experiencing the problem in editing the following fields. Can anyone help me.
name, category(Base and sub category), price range & payment options
on editing email & category it's returning error Parameters do not match any fields that can be updated, on price_range Application does not have permission for this action.
I could not find any permission name to allow price_range editing.
Kindly suggest me if there is any other API to edit these fields.

No, Currently Facebook Graph API supports update for general information. Hope surely Facebook will provide support in the upcoming versions.
reference : https://developers.facebook.com/docs/graph-api/reference/page/

I think the Graph API doesn't support updates for these fields.
The Page reference for Graph API says that you can update Page's basic attributes by issuing an HTTP POST request to PAGE_ID with Page Access Tokens. It lists a bunch of arguments that it supports, which are: about, description, general_info, website, phone.

Related

Pull data from CRM online using Web API

I've created a webpage that will be used as a survey for end users to submit a review of how the helpdesk technician did with resolving a ticket. I've built the webpage using HTML, CSS, JS, and PHP. The page currently needs to pull 2 things from Dynamics 365: Users name and the company. I currently pass the ticket # via the URL which I plan to use as the value in a lookup (somehow).
I think that I need to use the Dynamics API somehow to get access to pull data from the form but I am not sure how to go about that. I found this post online https://functionalthoughts.com/dynamics-365-web-api-retrieve-data-javascript/
which I think is only for web resources created inside of CRM.
Here is an image of what I currently have:
Image
and the value that I have passed via URL Image2
The end goal would be to pull the value of the name and company fields in Dynamics 365 Online.
Without full context of your application, I can only give you high level pointers.
Before anything,
You need to authenticate to Dataverse (the engine that is hosting the data your after). That means you need a an identity + JWT Token to auth.
This is the more complicated part, depending on how your managing access to your site and if your intending to allow dataverse to manage data access security.
To do that, in php, your going to want to start here: https://learn.microsoft.com/en-us/azure/active-directory/develop/reference-v2-libraries#web-application and read up the Python path for MSAL.
Once you have that you will either use a S2S app ( ConfidentialClient app ), or user identity auth ( publicclient app. )
For explanation sake, I am going to assume that you created a Confidential app to work with. In Dataverse this type of login identity is called an "Application User"
Now you need add the application user to Dataverse and grant it permission to read the data you want. You should work with the admin of the dataverse instance to get that setup. if your trying to solo it :) there is a good blog on how to do this here: https://powermaverick.dev/2020/08/10/create-application-user-in-dataflex-pro-cds/ Dont forget to grant your user a security role that can access the data your after.
Next,
You said you want to query by Ticket ID, again assuming that ticket id is in dataverse, you need to create an alternate key for the field that contains the ticket to be able to query on it.
you can find info on how to do that here: https://learn.microsoft.com/en-us/powerapps/developer/data-platform/define-alternate-keys-entity
Ok, now that you have a user to work with and can create a token, and you have an alt key on the column your trying to query on, you just need to form the query to dataverse.
General info on how to form and call queries in dataverse can be found here https://learn.microsoft.com/en-us/powerapps/developer/data-platform/webapi/query-data-web-api a specific example of retrieving via alt key can be found here: https://learn.microsoft.com/en-us/powerapps/developer/data-platform/webapi/retrieve-entity-using-web-api#retrieve-using-an-alternate-key
Now that you have all the setup done, and once you have formed your query, you will need to generate the token and add it to the authorization header of the request and send over.
That should get you data back.

How to show privacy policy URL and terms of service URL inside the Google one-tap UI for new users?

A few days ago, I noticed googleyolo client library was showing this message:
An UI change targeting on 5/18/2018 will show relying party's privacy
policy URL and terms of service URL inside the one-tap UI for new
users. If enabled, SHOW_RP_TOS can be found in
GOOGLE_ONETAP_EXPERIMENTAL_FEATURES array. To try this feature, append
'?e=1723232' to googleyolo client library URL.
When using https://smartlock.google.com/client?e=1723232 as googleyolo client library URL, I see no change in the one-tap UI.
Is there anything else that needs to be done to show Terms of Service URL in one-tap UI?
This feature is available for all sites now. If you don't see the links in the UI, check the following:
ensure you have supplied a privacy policy and/or terms of service link in the Google Developer Console for the OAuth project / client ID that you using in the API requests (under "consent screen" in the credentials section). Refer to the Getting Started guide for background.
verify that the active Google Account(s) has not already granted access to name/email address info via previous usage of one-tap or Google Sign-In button. You can check and reset this at https://myaccount.google.com/permissions
Also note that if you have multiple active accounts, you will need to select one before the blue button and legal text are shown. Please leave a comment if you have trouble.
Sorry that experiment didn't work. We'll be rolling out the changes this week, so you'll be able to see them. If you want to see the change on your site before it is rolled out, there is a google group (https://groups.google.com/forum/#!forum/yolo-web-testers) you can join and you'll see the notice.

How can I add the ability to extract and post tweets onto the site when user submits link?

I'm making a rails application, I want users to post their tweets by submitting a link [of the tweet]. I'm guessing its done with javascript/twittera api. Things needed to be extracted:
tweet owner
tweet + image
link to user profile page
Twitter REST API requires oAuth authentication. So, you would have to provide access token with all of your API calls. oAuth specification allows you to get access token through javascript as well. So you might want to look into that.
If you decide on using REST API, I would suggest moving this to server-side. You would be able to save user tweet urls and data.
Alternatively, if you are just playing with javascript and want to do this for yourself, you can simply see in your browser's developer tools where official Twitter widgets are getting tweet data and use that edges. I remember myself doing this several years ago.
But, please note. These urls are not public and official way of working with twitter data. So, they may change at any time and break your code.

LinkedIn share to individual

How do I share to an individual on LinkedIn, i.e., send a message to someone on LinkedIn?
http://developer.linkedin.com/documents/tags-and-templates#share
The above link doesn't specify how to pass the LinkedIn id of the user.
The consensus appears to be: There is no way to setup a URL on LinkedIn to share to a particular individual.
If a user wants, they can select to send their message to everyone or to a particular person, but it is up to the user:
Look at the documentation URL you have: this question is so old, that the documentation now 404's and redirects to a blank page. Here's the new documentation: Official Microsoft LinkedIn Share Link API Documentation.
In fact, in 2013, you could use other parameters besides url, like summary and title. Since being acquired by Microsoft, LinkedIn Share API is now strictly limited to only the url parameter.
Seeing as they have been stripping other parameters from the API, I think it is unlikely that they will be adding new ones soon, even a to-user parameter.

google+ page vs profile

I have an Asp.net webpage where I would like to display google plus information of the users. The google plus IDs are stored in a database. Is there a way (javascript/C#/VB) to determine if a google plus ID is related to a page or a profile? because I have to include different g:plus codes for them. I searched the google developers page but couldn't find anything related to this. Thanx folks!
I just got figured it out how to do this. Maybe someone will face this problem, so here is the answer. There is the REST API's people get method. If the userId that you target is that of a Google+ page, there will be an objectType attribute with a value of page. You can see this in action here. Just submit the query and look at the result response. You need an api key for your requests, this key has a limitation of approx. 10000 request/day. Here you can registrate and obtain the api key.

Categories