![An access token is required to request this resource. (#104) An access token is required to request this resource. (#104)](/uploads/1/2/4/8/124852039/738894169.png)
A page access token is required to request this resource even though correctly provided #504 Open devilteo911 opened this issue Mar 31, 2019 0 comments. Feb 23, 2017 It means that you need a 'token' a string of numbers and letters that gives you authorization to access whatever your URL was trying to access. This token is usually appended to a URL. In facebook for example, the access token is used to gain data from their API. See Access Tokens for more info on Facebook - it will be similar for other sites.
Join GitHub nowadays
GitHub can be home to over 36 million developers working collectively to host and review code, take care of projects, and create software jointly.
Indication upPossess a issue about this task?Sign up for a free of charge GitHub account to open an problem and contact its maintainers and the area.
By pressing “Signal up for GitHub”, you concur to our terms of provider and personal privacy declaration. We'll occasionally send you accounts related emails.
Currently on GitHub? Indication in to your accounts
Remarks
left a commentInterest 2, 2015
I'michael trying to use the component simply to obtain data from a public Fanpage no authentication needed at all. Generally, I'm carrying out a very simple test. I do the initialization, like below:.config(function(FacebookProvider, FanPageConfig) FacebookProvider.setSdkVersion('v2.3'); FacebookProvider.init(FanPageConfig.fanPageId); //myfanpageapp )and in my Controller:Facebook.api('/myfanpageapp', function(response) $scope.test = reaction; );In my Stainless- Dev Tool I can notice the request:https://chart.facebook.com/v2.3/myfanpageapp?callback=FB.globalCallbacks.n3d42770fcamp;technique=getamp;pretty=0amp;sdk=joeyand I'meters getting the following mistake:'mistake':'information':'An access token is certainly required to request this resource.','type':'OAuthException','code':104If you access the Website address straightway you can discover the information:https://graph.facebook.com/myfanpageappWill be there any setup lacking? |
left a commentInterest 2, 2015
Hi Thiago, as I said by email, it is definitely simply a issue of setting up it properly and using calls properly. Be calm. Today, I would like to help but I will question you an instance where we (ngFriends) could help you. Please use jsfiddle or plunker (http://plnkr.co/) to make a operating instance as you possess it now. Regards, Luis |
commentedMonthly interest 2, 2015
Hey spouse, This will be my simple example I'meters speaking about. http://plnkr.co/edit/v90Uvoa0qZWH4eqtV5Ov?p=preview I believe it might end up being some set up missing. If therefore, I'll lead on the readme :) Thanks a lot Thiago |
mentionedApril 3, 2015
@serraventura You require to replace fanPageId with a Facebook App Identity on this range: create one right here https://developers.facebook.com/apps |
commentedApril 3, 2015
Hello there @gliddiard , If you have a appearance on my Plunker you can notice I'meters using the title of my fanpage. Like this https://chart.facebook.com/myfanpageapp. What I comprehended from Documents you wear't want to produce an APP to get open public infos from a Fanpage, you can use the fanpage Identity or the title. In fact I tested with both the name(myfanpageapp) and ID(798758500213688) results me the same error. If you access these hyperlinks straightway you can see the same data https://graph.facebook.com/myfanpageapp https://graph.facebook.com/798758500213688 But today I'meters in question. Should I make an APP to get infos from a fanpage? Thanks |
left a commentApril 3, 2015
@serraventura to use the Facebook SDK, you need to initialise it with an APP ID e.h: after that you can create API demands to any public endpoint via Facebook.api technique. If all you need to do is read from a public chart endpoint, you put on't really need to use this library, you could simply use angular'h built in $http service |
mentionedMonthly interest 3, 2015
I created an APP and examined the Identification and I'michael actually obtaining the same error. Also therefore, I cannot observe the relation between the APP and the Fanpage. How will my APP know which Fanpage it should obtain the data? I'm guessing now there's no need to make an APP. If I'm wrong let me know. thanks a lot |
mentionedApril 3, 2015
Ops I do not discover your response. I'll think about it. Therefore, I should not make use of this collection. I has been considering about it that probably this collection is not intended to function in this way, just for facebook APPs. Thanks a lot @gliddiard |
mentionedFeb 14, 2016
@serraventura , i require the structure program code for getting FB web page information. I attempted so several ways but i couldn't obtained the outcome. |
Indication up for free of chargeto join this discussion on GitHub. Currently possess an account? Indication in to remark
I am fresh to Springtime Protection and I desire to implement a client for a OAUTH2 secured support that only welcomes
security password
give.Acquiring the
accesstoken
from the auth machine is accomplished using information in the http entire body like this:Afterwards the
accesstoken
must end up being utilized in the header fieldAuthorization
to access the real services. (age.gary the gadget guy.Authorization=Bearer lt;accesstokengt;
)My objective is usually to use the provided features from Spring Protection OAuth2 to request an
accesstoken
from the auth program, and use it for getting at the provider endpoints until token termination. I furthermore including to possess that myaccesstoken
is usually automatically rejuvenated using therefreshtoken
worth from the auth server. I need to achieve this while completely utilizing Springtime's features.I discovered that I can use
OAuth2RestTemplate
withResourceOwnerPasswordResourceDetails
for the granttypepassword
.The StackOverflow post oAuth2 customer with security password grant in Springtime Security had been very useful for me, but I possess not got it to function.I furthermore found the blog post Authentication is definitely required to obtain an access token (anonymous not allowed) where a consumer stumbled upon the same exception, but utilizes
clientcredentials
andAuthorizationCodeResourceDetails
.At the minute my code looks like this.
An exception can be tossed in
AccessTokenProviderChain
, because of this stop.Right here is certainly the exception bunch find.
As you can observe I cannot request an
accesstoken
. I perform not know why I obtain this exception, because if I straight request anaccesstoken
from the auth server using the curl command word, I have always been able to authenticate using just the offered data as stated.I by hand obtained an
accesstoken
successfully like this, when including the adhering to program code before invokingrestTemplate.getForObject(.)
.But, personally acquiring the
accesstoken
will be not that what I desire. Is certainly there something I was missing? Is certainly it achievable to instantly get anaccesstoken
and refresh it making use of Spring Protection withsecurity password
grant?Although checking code several hrs on Github, StackOverflow etc. I possess not been capable to obtain my code to work.Up-date:
I discovered that my
ResourceOwnerPasswordResourceDetails
example inside myOAuth2RestTemplate
instance is not really initialized, when I want to make use of it insidegetDataFromService
. (i actually.at the. the fields like username are null). After clarification and assist from @JoeGrandja, my issue now will not actually target Spring Protection, but rather Spring.What can I do to create make use of of the
@Worth
annotations inside a@Bean
annotated method. At the instant, when therestTemplate
will be constructed using the@Bean
annotated methodreference
, the values from theapplication.yml
are obviously not really available yet.BernhardS
BernhardSBernhardS
1 Response
I discovered a remedy with the assist and support of @JoeGrandja. Say thanks to you quite much! :)
If anyone else provides problems, here will be my operating remedy. I furthermore recommend reading the responses from @JoeGrandja above.
![Request Request](https://habrastorage.org/webt/o2/a6/tl/o2a6tl45dfvoqcsugckynjbwz8w.png)
BernhardSBernhardS