tags:

views:

33

answers:

1

Hi,

I am new to cakephp, I want to retrieve the access_token from this url.

http://www.my-site.com/#access_token=116122545078207|2.1vGZASUSFMHeMVgQ_9P60Q__.3600.1272535200-500880518|QXlU1XfJR1mMagHLPtaMjJzFZp4.

I tried using $this->params['url']. I am not able to get the access_token.

I appreciate any help.

+3  A: 

From the provided url I can say that it's not possible to fetch access_token, because it's an anchor rather than a variable. So it's not passed the the script.

You can take it with JavaScript first and populate a hidden field or in some other way.

It's not just cakephp, even plan php cannot access it.

Nik
Agreed, unless you have the url available to you in a variable in which case it's a simple parsing exercise.
Leo