Setting website_url application property to blank via the API - facebook

Any idea how to set website_url application property to empty via the API? When I try to send an empty parameter, I get 'true' as a result but it does not update the property.
curl "https://graph.facebook.com/myappid?website_url&access_token=applicationaccesstoken&method=post"
This is to comply with the latest policy about on-canvas only games.
refer to bug: https://developers.facebook.com/bugs/140498756103463?browse=search_50d24fd418f5d6c41473620

Docs state that an array can be unset if editable, we can try passing an empty array and see if that does the trick.
Create
To set properties for an app, issue an HTTP POST with an app access
token to
https://graph.facebook.com/APP_ID?PROPERTY_1=PROPERTY_VALUE&PROPERTY_2=PROPERTY_VALUE2
using the same properties and formats as in the table above. Not all
app properties can be edited via the API, please refer to the
properties in the table above for an indication of whether a property
can be edited or not.
Array properties can be unset by passing an empty array.

Related

Changing "purchasable" in WooCommerce using REST API

I am trying to update the "purchasable" flag on a product variation using REST API
/wp-json/wc/v3/products/<prodID>/variations/<varID>
I have tried sending a simple
{"purchasable":false}
as well as getting the current data for the variation, changing the "purchasable" entry to the new state, and submitting the entire data back to WooCommerce. In no case have I been able to change this value using REST API.
I am using jw-auth for authentication and have a proper token (I do receive a proper response back with all the data for the variation, but still with the old value of "purchasable" in it, so I know I'm communicating with the back-end).
Is there some setting elsewhere that needs to be set for me to be able to change this specific property? The variations have been created using REST API as well, and on the shop it works fine (I can pick the variations as expected).
What am I doing wrong? Or have I found a bug in WooCommerce? :-)
That field is listed as ReadOnly in the api docs. I believe Woo uses other criteria to set that value. In my research, it appears that setting the Stock Status to "outofstock" seems to be a common method for keeping an item from being purchased. Also, setting the price to null or empty.
https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties

Using mashape api in sapui5

I'm fairly new to sapui5 and I'm trying to use the Hearthstone API in order to show a list of cards.
I've registered in the page and I've obtained the X-Mashape-Key which I'm using to try to connect to the API.
For this, I've created a destination with the following information:
Besides this, I've created a view and its corresponding controller with the onInit function, with the following code:
Being the sUrl: /hsApi/cards and oHeaders:
var oHeaders = {
"X-Mashape-Key": "key"
};
The result that I obtain is the following one:
Request is failing stating that I'm not authorized to request the information, even though that doing the same request in PostMan I'm obtaining the information.
Most likely, this is caused by something really obvious but I'm not able to see it.
Could you try adding the following property to your destination? I am not sure what this property does exactly, but maybe you need it to allow this destination to be used in your WebIDE. Also try changing your "True" and "TRUE" to lowercase "true".
But I think you don't need any "Additional property" at all. Can't hurt to try it without them aswell.
Please keep in mind that you need to restart your WebIDE everytime you change something in your destinations as those are loaded statically every time the WebIDE loaded.

Updating action properties which are objects

Is it possible to update an object property of a published action? I tried POSTing to:
https://graph.facebook.com/ACTION_ID?OBJECT_PROPERTY=OBJECT_URL
&access_token=VALID_ACCESS_TOKEN
I got true as a response, as you do.
I can update first-level properties such as expires_in, just not connected objects.
No, you cannot modify the object properties in this way.
You can modify action properties in this method, but if you want to update the object, you need to change the OG tags on that object's URL, and either wait 48 hrs for FB's cache to expire, or force a rescrape of the OG object properties by using the debug tool at http://developers.facebook.com/tools/debug
or via the API by POSTing to
https://graph.facebook.com/id={object-id or object-url}&scrape=true

ASP.NET MVC getting cookie name of a specific domain

We will have have only dynamic named cookie on the domain. how can i get the name of the cookie.
After getting the name i have to Add a list to the cookie, which will have other values as well already added.
You could look at the Request.Cookies property which represents a collection of all cookies sent by the client browser. You may loop through the cookies and look for the one you are interested in by using the Name property. Once you find it you may modify it's Value property. As an alternative you could manipulate the Values property.

how to set read only properties to the particular info path form control based on user logged in?

how to set read only properties to the particular info path form control based on user logged in?
Your best option (assuming you are using managed code) is to get the user name with either Application.User.UserName or HttpContext.Current.User.Identity and then call IsInRole (I believe it is a member of the WindowsPrincipal class).
Save the result into the value of a field and you can then use the standard conditional formatting to lock the fields you don't want the users changing. I also usually conditionally change the look of those readonly fields (grey background fill etc) so the users don't get confused and think they can edit.