Draft Knowledge article not accessible via apex - article

I have a user without "knowledge user" permission and he is able to access draft article via UI however when trying to access from a VF page , in debug logs we are getting error :-
System.QueryException: Insufficient access rights: you cannot access draft articles.
Checking "Knowledge user" will imply license usage which we want to avoid, also if salesforce is allowing article accessibility via UI then why not via Apex.
When I check "knowledge user" VF page works fine and does not give any error but why to check that if without checking for that user he can access article from UI.
Not sure what else I can try before expecting a response from someone here. Any suggestion will be appreciated.

Related

Test Facebook Graph API without Page Public Content Access permission

Is there a way to test an app implemented Facebook Graph API required Page Public Content Access permission?
I was testing the {page_id}_{post_id} endpoint in Facebook Graph API Explorer to get a post, but got the error message:
This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature. Refer to https://developers.facebook.com/docs/apps/review/login-permissions#manage-pages and https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS for details.
This error applies to both random pages and pages that I own. I couldn't use it at all. The app I've planned to do is mostly based on Facebook posts so I may say this is it's the main function, so I just can't have the app reviewed until I can test this endpoint successfully.
What can I do to make it work? Any help would be appreciated!
It turns out I chose the wrong type to create my facebook app. I chose to create a "Business Connected Experiences" app instead of a "Manage Business Integrations" one, so I couldn't fully access to the permissions I need to query on my own page. The former only doesn't provide me the pages_user_read_content and the likes, so it was unable for me to read comments from posts. Besides, I also use an user token instead of a page token (Thanks Lars for pointing this out for me).
So, I just create a new app with the right type and everything turns out well.
Hope this will help someone someday.

Can I do anything about Facebook returning an error about 'Page Public Content Access' after a password reset?

I've come on to help a company out at the last minute after a developer bailed, and I'm left with some annoying quirks. I'm also very green when it comes to Facebook API. I don't have all the history, but here are the facts as I know them:
I've got a Facebook application that is used by a single Facebook account. This Facebook application reads public content of various pages (pages of clients, to be more specific) on Facebook (specifically follower and like counts). Periodically on a web server, we get these numbers and update our records for said clients.
Now, this application has executed fine for months. For security reasons, we changed the password for the Facebook account associated with this Facebook app. After recreating the access token, I started getting the following error:
To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.
My question is, why now? Why did a password reset cause this? Was this app originally grandfathered into not needing to be approved, and now that a password has been reset the app needs to be reviewed? In looking at the app's permissions it does seem it wasn't approved for this feature.
The reason I'm asking is if there's some other reason why this restriction was suddenly added, I'd like to know. Perhaps it's only applicable for certain scenarios and by updating the access token I inadvertently requested some feature the previous app never did?
Thanks.
There is no way to access public pages you do not own without getting "Page Public Content Access" approved now, this was changed a while ago already. So you are probably right, it may have worked only because of the old Token.
There are two ways to solve this:
Get Page Public Content Access approved by Facebook
Use a Page Token for all the Pages - you can only get it by having a role in the Page

create page programmatically for a test user

Can I create via api pages for a test users?
This is what I did:
Given my app, I got the user's token from app dashboard test users and I tried to use it in the graph explorer (POST /user_id/accounts).
I've the error "(#10) Application does not have permission for this action".
These are the permission the app has been granted for: manage_pages, publish_pages, publish_actions
Do I miss some permission or it is not possible?
Luca
[Edited following Simon's advice and the response below:]
I've been looking into this all day and it seems the answer is a solid, "Nope."
According to the developer documentation on creating pages, the {user_id}/accounts endpoint only supports Reading, not Creating, Updating, or Deleting.
Although apparently if you apply for Standard API access, you can receive permissions to create pages. (Only available if your app is generating ad revenue.)
Googling, reading and trying, I figure out that we can create a page via api.
https://developers.facebook.com/docs/graph-api/reference/page/#Creating Applications with Standard API Access can create Pages through the API using the following paths: /{user_id}/accounts
So the answer to my question is yes, if your application has the Standard API Access, no matter if you are dealing with test users or not. Note that teh call is slow (about 5 sec.)
That's it.

Facebook Graph API - Unable to access public fan pages

I am using the graph API to retrieve information and I have stumbled upon an issue where the Graph API won't return any information. The page I am referring to http://facebook.com/JubilationDanceMinistry which one can publicly access and see, however when I go to the Graph API URL: http://graph.facebook.com/JubilationDanceMinistry it is denied. I understand that Facebook explains this issue by saying it is by design.
We deliberately do not return a more specific exception for this case; the error message covers invalid IDs, non-existent objects, deleted objects, objects which are not visible to the caller due to demographic restrictions, objects not visible because the owner of the content has set privacy settings which exclude the caller, content not visible because the owner of the content has blocked the caller, because the owner of the content has disabled platform apps from accessing any information about their account, etc. (emphasis added)
So the reason is most likely that platform apps access has been disabled, however I see no setting for this anywhere, so I doubt this is the case. Does anyone have any advice what is going wrong here?
Thanks.
The page I am referring to http://facebook.com/JubilationDanceMinistry which one can publicly access and see
Not really – when I click on that link, I get taken to the FB home page, although being logged in to Facebook. So I think it’s fair to assume that this page is not publicly accessible, resp. that there are access restrictions in place (based on country maybe, because age and alcohol restriction should not keep me from accessing it).
And in those cases, you can only get access with a user access token – because that’s the only way for Facebook to verify that the requester is allowed to see the content.

give a role access to specific folder in Sitecore 6.5

I have a user who's been assigned the sitecore/Analytics Reporting role (member of Sitecore Client Users), and when I log in with that user I can see Marketing Center, Engagement Analytics and Executive Dashboard. I now want to give this user read access to a content item, but I can't make it work.
First of all, the sitecore/Analytics Reporting role already has read access to the content editor etc (inherited from the Everyone role), so why can't I see it? I created another role with explicit read access to the content item and assigned it to the same user, but I still can't see it. Does anyone know what I need to do for the user to see the content item?
I seen this a few times before with older Sitecore versions. Doing a Sitecore cache clear or IIS reset resolved it at that time.
After checking with Sitecore support they told me you have to add Sitecore Client Designer to your role (even though the Access Viewer shows you have read access you still won't be able to see it until you've added this role).