Recently, our family has started watching HGTV-style shows on Netflix. One of our favorites is the Property Brothers. I went Googling today and visited this link:
http://www.today.com/home/property-brothers-give-peek-inside-their-beautifully-renovated-las-vegas-1D80297959 (wow)
I went scrolling down the page, and was surprised to see the URL in the URL bar change as I went onto the next article. The previous article was still above, and the URL switched back when I scrolled back up. How does Today.com switch URLs without loading a new page like this? It's seamless!
I have heard of the History API before in relation to Facebook. Is this what's being used?
I have heard of the History API before in relation to Facebook. Is this what's being used?
Yes. From MDN's "Manipulating the browser history" web-guide:
Suppose http://mozilla.org/foo.html executes the following JavaScript:
var stateObj = { foo: "bar" };
history.pushState(stateObj, "page 2", "bar.html");
This will cause the URL bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists.
(See the above-linked guide for much more information.)
Related
I'd like to find the specific podcast episode titled "#1: The Single White Guy Focus Group." According to the iTunes search API, I believe I should be able to find it with the following:
https://itunes.apple.com/search?term=%231:+The+Single+Straight+Guy+Focus+Group&entity=podcast&attribute=keywordsTerm
But that returns an empty JSON. I also tried
https://itunes.apple.com/search?term=The+Single+Straight+Guy+Focus+Group&entity=podcast
... and ...
https://itunes.apple.com/search?term=The+Single+Straight+Guy+Focus+Group
... but I always get the same result.
{
"resultCount":0,
"results": []
}
I'm baffled. I know the episode is in there - here it is.
https://itunes.apple.com/us/podcast/1-single-straight-guy-focus/id775053292?i=1000375469754&mt=2
(posting full url so deliberately, so you can see that indeed there is a url which does point to that specific episode)
So why can't I find it?
EDIT: Note that I am doing this in an Obj-C iOS app, in case that is relevant.
After a TON of hair-pulling, I've found that there is an undocumented entity (podcastEpisode) that does what we all want.
So, on the off-chance the original poster is still at this after 3 years (or more likely other frustrated folks like myself browsing) - try this (using the original example):
https://itunes.apple.com/search?term=The+Single+Straight+Guy+Focus+Group&entity=podcastEpisode
Unfortunately apple API searches only by the title of the podcast and not by the title of the episode. I'm trying to add a search by episode on my app but to no avail so far
I'd like to create an index view which shows a list of items followed by a 'view in app' button to download data directly into the app.
Solution 1. [Not a sulution] I think deepviewcta call is appropriated to use in a single product page. It doesn't look like suitable in my case, because it has to call deepview before calling deepviewcta.
Solution 2. I'm trying to construct the URL directly using 'dynamic' deeplink. The documentation says any additional query param appended will shows up in the initSession callback, but it doesn't work for me.
the construct link looks like this:
https://bnc.lt/a/key_test_kkkkkkkkkkkkkkkkkkkkkkk?has_app=yes&channel=character&my_list_id=0c56c4bc-fac9-412a-be19-c0feefe30d29
what I got in the callback only has following data
"+clicked_branch_link" = 0;
"+is_first_session" = 0;
in the callback, other params are just missing, I got:
url NSURL * #"my-app://open?link_click_id=197576253652400385" 0x00007fad90d47450
Any Other Solutions?
It turns out I was using live key in ios App while using test key in server end. So solution 2 works now.
Also for anyone want to do the same thing. For regular Branch Links, it is not possible to stay on the same page as the Branch link was clicked from. they suggest adding a $after_click_url to the Link's data. This key will tell the system to route to a particular web address after the Branch Link has been clicked.
Thanks for branch.io's support, they responded very quickly.
I'm working in a Rails 3.1.8 app and I'm having a problem creating a Twitter share button that produces the text I want. Here is the erb code for the button:
Tweet
This button appears on a page that contains content produced by a particular user. Let's call the user "sam". The text this code produces to be shared on Twitter is:
[some_text] [url of current page] via #sam
I would like to remove the "via #sam", but I cannot figure out how. If I explicitly set data-via I can change the user that the "via" phrase refers to, but I cannot make it disappear.
This support page suggests that omitting the data-via tag should do the trick, but I have found that it does not.
I've searched around the app to try to find a place where this parameter is being set, but I haven't found anything. However, as I'm pretty green with Twitter stuff, I may not be searching for the right thing.
Thanks in advance for your help, and do let me know if I can provide additional info.
ADDENDUM: I've tried add setting data-via to various values, including false, "false", and "", as well as appending ?via= and analogous values to the share URL. Each of these attempts resulted in a bogus via phrase (e.g. "#false"), or a default to "#sam".
Maybe you have an old version of the Javascript being included or cached.
Taking examples from https://dev.twitter.com/docs/tweet-button works as expected when omitting the data-via attribute.
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Working example: http://jsbin.com/uxopur/2/
I'm creating a script that logs a user into a site. Everything works but for some reason when the user clicks on the link to go to their profile the link opens in a new window and at first redirects before going to the correct page.
For example:
The correct link is: https://sites.google.com/site/examplelehan/Jan_Moolman but the moment the link is clicked the link that is actually executed in the address bar changes to: http://www.google.com/url?q=https%3A%2F%2Fsites.google.com%2Fsite%2Fexamplelehan%2FJan_Moolman&sa=D&usd=2&usg=AFQjCNFXLLswDh2AWCBpYi54jNXxpZVGPQ
So it seems as if www.google.co.za is being pre-pended to the url. I've seen other posts as well but none of them seem to be offering working solutions. A few posts have said that this occurs when the link is created without the http:// prefix but I've tested that and the same problem occurs.
I've also tried using .createHTML in order to create the link but for some reason the link doesn't show, any other HTML I use seems to work so I guess that's why Google created the Anchor function.
Thank you in advance for your help.
In this issue tracker comment Eric Koleda suggested a workaround using UrlShortener Services . I tested it with your link (http://goo.gl/HRPfU) and it seems to be a working solution.
EDIT : to answer your comment, here is a working example :
function test(){
var shorturl=short('https://sites.google.com/site/examplelehan/Jan_Moolman');
Logger.log(shorturl);
}
//
function short(longurl){
var toShorten = UrlShortener.newUrl().setLongUrl(longurl);
var short = UrlShortener.Url.insert(toShorten).getId();
return short
}
note that this API has to be activated before it can be used (see docs)
I have looked and searched for an answer for that question and I found an answer in Nathan Totten blog you can find the answer here:
https://gist.github.com/820881
The problem is I am trying to get the application settings according to the application which the user uses, which comes from the url by seeing your app name or id if you were in fan page.
It works with me within the user profile context by using:
var CurrentUrl = HttpContext.Current.Request.UrlReferrer;
and i can get the application name but within facebook fan page when using the same way it gives me a strange url :
http://static.ak.facebook.com/platform/page_proxy.php?v=4
However, it is supposed to give me:
http://www.facebook.com/pages/Mypagename/130736200342432?sk=app_myappId
Any help will be great and any new way to get which app id or tap url the user clicked will be even better.
this problem was exist within the user profile before ,and i think that you use the ifacebookapplication current method that will not give you the chance to get any thing about the context it only take you to an infinite loop ,i think that you have to send to Nathan Totten him self may be he has an answer because in the article he mentioned :
private IFacebookApplication GetCurrent()
{
var url = HttpContext.Current.Request.Url;
// Get the settings based on the url or whatever
var simpleApp = new DefaultFacebookApplication();
// Set the settings
return simpleApp;
}
may be he has a way to get the url within fan page or another way which i am sure it is not exist at least in my mind now .
Thanks ,I found an answer to my case :) now i can get my application id the way is i have to applications i try to decode the sign request with the app secret of each one if the decode result was clear then it is my target app if not then i will try the other one