I have a website done with Yii2 and the extension "amnah / yii2-user"
And I am trying to follow the instructions on the link below to publish ads on the members page. However I am unable to validate the data.
Can anyone give me an example of how I should fill in the fields?
https://support.google.com/adsense/answer/161351?hl=en
http://www.webnots.com/adsense-crawler-access-to-password-protected-pages/
EDIT
I tried this:
*Restricted url - http://example.com/user/profile
Login url - http://example.com/user/login
Login method - POST
Parameter - LoginForm[email]
Parameter - LoginForm[password]*
The message below in the PARAMETER field:
These characters are not allowed: [,]
Related
I am trying out the Apache Shiro framework and I basically downloaded the setup from a project online. I managed to get it working but I am stuck at a really small issue. I want to make multiple JSF pages in my project to be accessed without any authorization.
The configuration currently looks something like:
authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter
authc.loginUrl = /login.xhtml
roles.unauthorizedUrl = /login.xhtml
Now I would like to add one more page to roles.unnauthorizeddUrl i.e. signUp.xhtml
I tried
roles.unauthorizedUrl = /login.xhtml,/signUp.xhtml
but that doesnt work. Is there a way to declare multiple unauthorized URL's in the config.
The roles.unauthorizedUrl is the Url to which the user has to be redirected in case user tried to access the protected / unauthorized url. So you only add one such URL, otherwise ambiguity will be raised to the framework to which url to redirect.
If you want unprotect any url use the below config in [urls] section
/login.xhtml = anon
/sugnUp.xhtml = anon
I am developing a Cordova App, and I use a URL parameter to manipulate or control my pages. e.g.:
file:///App/www/index.html?goto=profile
What I am trying to do is to remove the goto parameter from the URL.
An example use case: the user login using a temporary password. When the user logged in successfully the app will point them to the "change password" page, which is represented by a parameter on the url - ?goto=profile. Now the url has this parameter.
The problem here is that two parameters are set; ?goto=profile and ?goto=messages (directed the user on his inbox page). So the url now would be file:///App/www/index.html?goto=profile?goto=messages.
How to remove the ?goto=profile in the url without reloading the page?
to add multiple search query parameters, concatenate them with an ampersand (&). e.g.:
file:///App/www/index.html?goto=profile&goto=messages
if you don't want multiple parameters (they have the same name, so i presume you only want to replace the goto parameter value), just overwrite it.
i don't know the implementation used for routing, as you did not specify it in your question, but with plain javascript, it'd be something like this:
location.search = 'goto=messages';
Does anyone know a way of getting details of DLC and Bundles from steam?
I can easily get App details with the following URL: (Borderlands 2)
http://store.steampowered.com/api/appdetails?appids=49520
This is the store page, notice the GET part of the URL is /app/{id}/
http://store.steampowered.com/app/49520/
Now I need to get the same sort of result from the API for a bundle.
This is the store page, notice the GET part of the URL is /sub/{id}/
http://store.steampowered.com/sub/32848/
I tried
http://store.steampowered.com/api/subdetails?subids=32848
and get Access Denied.
Any suggestions?
You should use package instead of sub to get the information.
You can use below link to access the package info
http://store.steampowered.com/api/packagedetails?packageids=32848
There is currently no way to get bundle info, without scraping the HTML. Only apps/packages.
I am trying to get the url of an image attachment published by a facebook page. The goal is to embed that image in a webpage in order for the website to always display the last image attachment published by the page. I own both website and FB page.
I have yet not grasped all the details on handling Facebook Graph API, but here is what I did so far:
1) in FB developers website, I have created an application, getting its App ID and secret;
2) I used that information to get an access token (just pasted in my browser the following code:
https://graph.facebook.com/oauth/access_token?client_id={my-client-id}&client_secret={my-client-secret}&grant_type=client_credentials
3) in my website, I have loaded Facebook JS SDK after the body tag; and got also my Facebook page ID from Facebook Page administration;
4) now the real question begins: how can I query Facebook to get the information that I need – the source url of the last published image?
The best result I have gotten so far was by making a getJSON call with the help of jQuery:
var fbfeed = $j.getJSON('https://graph.facebook.com/{my-page-id}/feed?access_token={my-token}&fields=attachments&limit=1');
This will get and store a JSON array in the fbfeed variable (please correct me if I'm wrong). One of the keys of that array is called "src" which contains the source url of the attachment – the information I need to embed that picture in my website;
I have the following problems / concerns:
- I have not found the way to retrieve the value of the "url" key – how can I do that? How can I parse the fbfeed variable and extract the value of the "url" key?
– I have concerns with my usage of the access token:
is it problematic to expose the access token in this way, by using it in a jQuery function? Is it a security risk? If so, can I "mimic" this request but using a server side language such as PHP?
Will this access token expire (i.e. will I need to repeat step 2 from time to time?). So, imagining that I can get this to work, will I need from time to time to "refresh" the access token?
Thanks for your help.
I have managed to get the information I needed using server-side code, although it may not be the most "clean solution": it will iterate through the last 5 posts of my page until it finds an image and a post url:
<?php
$url = 'https://graph.facebook.com/{page-id}/feed?access_token={access-token}&fields=attachments,link&limit=5';
$json = file_get_contents($url);
$json_data = json_decode($json, true);
for($count = 0; $count < 5; $count++) {
$imagesource = $json_data['data'][$count]['attachments']['data'][0]['media']['image']['src']; // gets the image url
$postlink = $json_data['data'][$count]['link']; // gets the post url
if (isset($imagesource) && isset($postlink)) {
// do stuff with the image and post url
break;
};
};
// then I can do other stuff as fallback if the image url and post url are not found
I am trying to set up some open graph meta tags on my web site and am having problems with the fb:admins user id#. When I use my id# from my FB page, 223665414363346, I get an error message when using the URL Linter ( id# for property'fb:admins' could not be parsed as type 'fbid ). When I debugg with the id# that was automatically generated with the code, 100003038822124, then everything is fine, except this # seems to be generic.
When I check my id# 223665414363346, which gives an error code in the URL Linter, with graph.facebook.com/you_user_name using my id# all of my info is listed, including my id#. When I do this with the generic id# 100003038822124, that passes the URL Linter, all I get is text saying "false".
http://www.stonewallplates.com/index.html has automatically generated fb:admins user id# 100003038822124 in the head section.
http://www.stonewallplates.com/dealers.html has my fb:admins user id# 223665414363346 in the head section.
When I set the fb:admins user id# as 223665414363346 on stonewallplates.com/index.html then I get an error code below the comment box "warning: stonewallplates.com/index.html is unreachable.
Also likes on my web site are not showing up on my Facebook page.
I have been trying to figure this out for over a week but no luck so I figure it is time to ask for help.
Thank you in advance for any help on this matter.
David
PS I have removed the content from fb:admins user id# since I don't have the correct # to use.
If your user ID is returning false in the Graph API it's probably because you've disabled platform- go into your privacy settings, the 'apps, games & websites' section and check you haven't disabled platform
If it's a page ID that's returning false, it's probably because the page is locked to certain locations or age ranges and you're not using an access token from someone who meets those restrictions