for test i use https://developers.facebook.com/tools/debug/sharing/ site gmk.ru, but data loaded from site amobile-studio.ru
site gmk.ru contains another content.
iam use open graph properties on news page (share have only this page), example: http://gmk.ru/news/view/id/826
but the data is still not correct
Related
I am working with mining some links from a Chinese academic article database.
It appears that when I refresh the page to an article I'm looking at, or simply copy and paste a url, the url redirects to the database's home page rather than the article.
For example, the following link goes to my search results:
http://search.cnki.net/search.aspx?q=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD
The first article's individual url is:
http://www.cnki.net/kcms/detail/detail.aspx?dbcode=CJFQ&dbName=CJFQ2016&FileName=KJDB201615009&v=&uid=
However, if you try to directly click on the article link or refresh the article page, it redirects to the database home page. Why is this happening? Is there any way to get a "stable" url to these articles?
One detail that may matter, although I'm not sure, is that the url in the HTML code to the individual articles is also different.
<a href="http://epub.cnki.net/grid2008/brief/detailj.aspx?filename=KJDB201615009&dbname=CJFDLAST2016" target="_blank">
It's not really up to you.
The website you are referring checks if the link you are opening is a direct link or was opened from another page on the same website.
This is probably to prevent embedding links of this website in other websites.
In short, it does not allow direct links to its articles.
You can see it by examining the header returned from the request.
Instead of 200 OK you get 302.
Which tells the browser to redirect to another location.
You can try and fool the website by adding a "Referer" header to your request.
If you look at the header
that works you'll see that there is one.
I did not try but I'm pretty sure it will work.
i need to get some data from external web page (specific text between and tags in this web page source code )
and then show this data in my html.
or get part of html code of another page
then put it in my html page by a button click for examle
This is really hard if it's somebody else's web page due to CORS. However, you should be able to if it's your web site.
Use XMLHttpRequest to get the page content.
Set the container element's .innerHTML to the textual representation of the HTML.
I've just created a link which when clicked will take the user to a PDF file.
However when I open the PDF document on the mobile it shows only 3/4 of the page. The rest on the page is just black.
Is there a way in the CSS I can set a default zoom on the PDF?
HTML code:
<a href="privacyStatement.pdf" class="item icon icon-accessory item-icon-right">
Privacy Statement
<i class="icon ion-chevron-right icon-accessory"></i>
</a>
Have a look at this Adobe document:
Parameters for Opening PDF Files
(http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf#G4.1500435)
It describes different ways to set URL modifiers in a HTTP request.
But only Adobe PDF viewers will honor most of them.
Some may only work if the requested PDF is 'web optimized' (a.k.a. as 'linearized').
Some viewers made by other vendors may support some of these only.
You may be able to link to a specific page within a PDF hosted on the web.
So it could open on this page instead of the title page. The page=<pagenum> parameter is meant for that.
For example, try if your viewer jumps from the following link to Page 3 of above PDF Opening Parameter reference.
(The previous link requests the viewer to open the destination PDF directly at page 3).
Other parameters are useful too:
#search=<wordList>.
Example: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf#search="commentID"
#nameddest=<destination>
The PDF of course must contain such a named destination.
Otherwise it will not work.
You can create named destinations within a PDF with Acrobat (not with Adobe Reader, though!):
1. Go to the desired location in the PDF.
1. Click 'View > Navigation Tabs > Destinations'.
1. Go to 'Options', choose 'Scan Document'
1. Once scan is completed, select 'New Destination' from the 'Options' menu; then enter the name you want.
Important note: Named destinations are not the same as bookmarks.
There is no documented URL parameter which would link to a bookmark.
#comment=<commentID>
Specifies a comment on a given page in the PDF document.
Use the #page=.... command before this on.
For example: #page=1&comment=fd22-457c-84aa-2cf5bed5-452fde0e.
Zoom
Yes, you can also request a zoom level on a specific page:
#page=3&zoom=100
This would request a 100% zoom level for page 3.
#page=3&view=Fit
This is probably what you want!
It asks to display page 3, with its contents magnified just enough to fit the entire page within the window both horizontally and vertically.
If the required horizontal and vertical magnification factors are different, it uses the smaller of the two, centering the page within the window in the other dimension.
However, if it works is fully dependent on the viewer software, there is no guarantee for it to work. Good luck with that!
More details in the initially linked Adobe PDF file....
I am currently developing an iPhone app showing the contents of sports related articles available in my website. Each article contains one title, one picture and some content. When I refer to the content I include the text of the article, the youtube videos that can be here or not, the link refering to other articles that are or are not in my website (depending on the article) etc...
In the first version of my app I had two screens. The first one was a customized UITableView looking like this :
Then when I clicked on an article I had the article open up in a second screen like this :
I retrieve all of the data I need by calling a PHP file that it making a MySQL request to my server's database and then sending the data back to my app via JSON. The problem I have is that the content of the article is given in HTML and I cannot parse it so it can be dynamically used. For instance when there is a link to a website I'd like to have it clickable. When there is an embeded youtube video I'd like it to be viewable inside of my app. In order to accomplish that do I have to use a UIWebView ? (Note that I don't want to show the article page from the website directly into the app. I want to be able to customize it anyway I want).
You will need to take take the HTML content from your JSON. If you have valid HTML, you can simply load it in a UIWebView in your view using the following call:
[self.webView loadHTMLString:htmlString baseURL:nil];
Short of writing your own HTML parser, this is you best bet. So you view can have static UIImageView and UILabels for the title and image, and a webview that will display your HTML (which can be customized however you'd like).
I want to dynamically update the three images from "Trend Alert" in the EDM below:
http://sophiehart.createsend4.com/t/ViewEmail/r/D3501506593F4120/5AA0D88279FE59B738A555EB6E97B45B
To this Facebook iFrame.
http://www.facebook.com/apps/application.php?id=198582036826535&sk=app_198582036826535
I'm hoping someone knows a way to update these automagically - I don't want to have to manually change them every week.
The problem as you can see is that the EDM above spits out a different dynamic link every week.
Any one worked on something similar to this before?
This Facebook page currently features the same technique (The Latest section) - so if anyone can shed some light on it that would be great!
http://www.facebook.com/rachelzoe
EDIT: I've created the html email template and have got the iframe working - but i'm unsure how to link the images to the Facebook as the link to the html email (campaign monitor) will change weekly?
LINK to EDM: http://sophiehart.createsend4.com/t/ViewEmail/r/D3501506593F4120/5AA0D88279FE59B738A555EB6E97B45B
LINK TO FB: http://www.facebook.com/apps/application.php?id=198582036826535&sk=app_198582036826535
You can create a Facebook Application and install it as a tab in your client's Facebook Page. This tab will render an iframe with content from any URL that you specify. This way, you can do anything you want with your webpage (e.g. display 3 dynamic images), and it will be embedded in your client's Facebook Page.