I am trying to import contact list using google API. One of this example provide by google is
print "<a class=login href='$auth'>Connect Me!</a>";
Here
$auth = $client->createAuthUrl();
In this $auth gives an url which will be called onclick of Connect Me. This is a simple php example example which I want to implement in CodeIgniter. So I have moved this example logic to a model class. Here I want to save url response to DB and then send to a view.
How would to hit the url provided by $client->createAuthUrl() from model class.
Call the model from your controller, and then pass the data to the view as defined in the official documentation here and here like this:
and in
yourView.phpyou can use it like this