-1

I have a scenario, To collect user information from social networks like facebook, twitter and gmail. I have used gigya third party to login these social network and collect the information. on successfull login to gigya send the information in redirect url as

https://example.com/#registration-update?gigya=true&socialProvider=yahoo&gigyaUID=_guid_59DUvJro84GQM2B_o-SjcoWyforCmmvGQYVdMX1yhtlYImE_62mKDUWiUtPo0cxp&lastName=Jackson&firstName=peter&email=peter2015@ymail.com&zip=

Now I need to get the value firstname lastname and email from the url using jquery in seperate variable how can i do that please help.

user1900662
  • 299
  • 1
  • 7
  • 26

1 Answers1

0

Ref : https://stackoverflow.com/a/11677514/350858

You can use javascript function as follwo

function getQuerystring(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

var gigya1 = getQuerystring("gigya");
Community
  • 1
  • 1
Dhaval
  • 2,801
  • 20
  • 39