How to get last refrer Url in Asp.net - asp.net

I have found problem in my code. I am working on facebook application. and May be facebook made some changes so I got struck. Everything was working fine till yesterday. But from today it's not working.
Issue that what i found is. Earlier I was managing last refer url for some task. But its format get changed. Now it's not working.
Last refer URL is
http://apps.facebook.com/mycurrentfollower/?session={%22session_key%22%3A%221fd7d4189b8eded157c4a173.0-100000086206090%22%2C%22uid%22%3A%22100000086206090%22%2C%22expires%22%3A0%2C%22secret%22%3A%2226e9d307ff4038173e966d881faf0c97%22%2C%22access_token%22%3A%22194311980605862|1fd7d4189b8eded157c4a173.0-100000086206090|YmiFbTAucSZ-TvkCA6QZVUw4-8M%22%2C%22sig%22%3A%222c6a9973a4dd868744d712d919a2b937%22}
But when I am trying to fetch last refer url like
Uri requesturl = Request.UrlReferrer;
I am only getting this Part
http://apps.facebook.com/mycurrentfollower/
And this is also my current URL.
How Can I get rest of url. Please let me know. I trried lot of thing but nothing is working.
Thanks

hey i think this will help you
Request.UrlReferrer.PathAndQuery

Related

Article Share API from LinkedIn Throwing error

I'm trying to make a simple share button LinkedIn using the article share API. It's pretty straight foward, or so I thought.
When using the domain's href, it works:
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br/portal
I can even make it to another page:
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br/portal/servicos
However, if I try another page:
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br/portal/servicos/informacao?servico=3832
It brings up a error. Looking at the console doesn't really help that much, and at the network tab all the requests return 200.
I tried removing the query parameters, although the page doesn't work without them, and still, didn't worked
#edit:
Even the LinkedIn official inspector of pages can recognize the page, now I'm really confused:
https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fsp156.prefeitura.sp.gov.br%2Fportal%2Fservicos%2Finformacao%3Fservico=3832
Anyone has idea on what's happening? Thanks in advance.
The URL you are sharing contains a ? character. You need to escape that character using URL-encoding. So, this is what you should want...
https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fsp156.prefeitura.sp.gov.br%2Fportal%2Fservicos%2Finformacao%3Fservico%3D3832
Notice how the ? is rendered here as %3F. URL's should only have one ? at all, because that indicates that $_GET data is going to proceed that mark. With two of them, the server doesn't know and gets confused!
Looks good to me now!
In case you want to know more: Official LinkedIn Share Documentation
If you browse directly to the landing page of in debug mode you will see that it is returning the error 200 and not linked in.
https://sp156.prefeitura.sp.gov.br/portal/servicos/informacao?servico=3832
Ops, parece que este serviço não existe, busque um serviço na lista ao lado.
Which Google translate says is Oops, it looks like this service doesn't exist, look for a service in the list on the side.
LinkedIn has to redirect to a known good page, that is why the other two resolve.
I did notice that there is a login option on that page, is perhaps the page only accessible post login?

My querystring parameter continuously appear

I have a web app and i use the rewrite function for the URL. Here my sample URL:
www.mywebsite.com/oscar
It will bring the guest to www.mywebsite.com/User.aspx?blk=oscar
Everything is going fine until I realized that sometimes, I don't know why, every time my webpage do the post back, it will append the querystring into current URL. So the URL will be like this:
www.website.com/oscar&blk=oscar&blk=oscar&blk=oscar
anybody have the same experienced? please help me with your solution

Wordpress code causing 404 errors

I am receiving 404 errors (showing on Google search console)that somehow relate to Facebook.
eg http://www.beerandcroissants.com/staying-in-mykonos-myconian-k-hotel/room-at-myconian-k-hotel-mykonos/%22https:/www.facebook.com/pages/Beer-and-croissants/1423705111261254
What it seems to be doing is taking one link (eg part of the whole link above) which relates to a photo on my blog and then appending the facebook page url. So, if I take the first part of the link above
(before the facebook part starts) I get a perfectly good link through to my site. If I take the second part (where the facebook link starts) then it takes me to my FB page. Again fine.
Why are these two linking together like this as it is this that seems to be causing the 404. Is it something in my settings. It's only just started happening.
Going to facebook directly and clicking on my post links takes me to the correct part of my blog.
I am not sure how to fix this. There are no broken links attached in google for me to view either. They keep happening every day. I now have 295 crawl errors and growing.
Would appreciate any help that can be given to lead me in the right direction.
I've had this as a suggestion....but don't know where to look for this code....
I'd say it may be coming from the following code on :staying-in-mykonos-myconian-k-hotel/room-at-myconian-k-hotel-mykonos/
It's also likely this is carried through the entire site.
https://www.facebook.com/pages/Beer-and-croissants/1423705111261254">
Note the " in the URL before https://www.facebook
I suggest you go through your code looking for similar issues.
Could someone please assist me if they are able.
Greatly appreciated.
thanks
Kerri

Linkedin sharing page keeps spinning

I’m trying to use the shareArticle API on a website for a client, whatever parameters I’m giving the share page keeps spinning, it seems to be a parsing issue but I’m not able to figure it out.I’ve also tried to use the share button API but it’s not better.
This is the URL I’m trying to share (but every URL from the site seems to be having the same issue) : http://www.urbanem.fr/formation-gestion-conflits-mediation-2/
Any idea what might be wrong?
Here’s the source code to generate the share button:
$postURLLinkedin = urlencode(home_url() . "?p=" . get_the_ID());
$linkedin_share = '<li><a class="sb-linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url='.$postURLLinkedin.'&title='.urlencode($postTitle).'&source='.urlencode(home_url()).'&summary='.urlencode($postSummary).'" onclick="javascript:window.open(this.href,\'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;" title="Partager sur Linkedin"><i class="fa fa-linkedin"></i></a></li>';
If you load the url in your linkedin profile and then make sharing works again. It's not the right thing to do but I is saving me yet.
We need a fix for this, as I pass me the same. The link you want to share are created dynamic. The share is loaded and never get to share. With all browsers I have the same problem.
I just checked and its working fine. Though I didnt share it, but I was at the last step of sharing.

Google Adword not working /conversion.js not found

I'm currently working on a wordpress site. My task is just to add the conversion script in a thankyou page. I added the script here: http://www.livingedge.co.nz/thanks-for-getting-in-touch/ , unfortunately does not work. It says that a conversion.js was not found.
See the attached screenshot: http://screencast.com/t/52ixQUzHKNxZ
I added the conversion script on the footer put it in a conditional so that it will load only on the thakyoupage.
I'm new to this and can't figure out what would be the possible cause of such problem.
I tried adding the script in the header, on the page editor, on a form redirect.
Q: What could be the possible cause of this issue?
The URL you are using for the conversion script is incorrect — the correct one has "www" in the domain name.
The fact that you've got this link wrong makes me think you may be looking at incorrect directions.
Follow the instructions given in the Google documentation page "Setting up conversion tracking" precisely.

Resources