This is a migrated thread and some comments may be shown as answers.

redirect_uri facebook api

3 Answers 60 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Leonard
Top achievements
Rank 1
Leonard asked on 05 Apr 2014, 02:28 PM
I just clone 'sample-facebook-api'.
After login, how to go to another page in my app?
Thanks.

3 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 09 Apr 2014, 01:52 PM
Hello Leonard,

Thanks for contacting us.
In order to open another page you can use a simple link or a button as shown below or use JQuery mobile or Kendo controls to navigate to another view.
You can take a look at our JQuery Mobile and Kendo UI Mobile project templates.

<a href="my.html" >My View</a>

Please, do not hesitate to contact us if you have any further questions or need of assistance. 

Regards,
Zdravko
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
0
Leonard
Top achievements
Rank 1
answered on 09 Apr 2014, 08:02 PM
Hi Zdravko,

on the demo, after successfully login, it back to previous page. I need to go to another page soon after login.
Where should i put that function.
Thanks.
0
Accepted
Zdravko
Telerik team
answered on 14 Apr 2014, 01:09 PM
Hello Leonard,

You can navigate to your page right after login if you change the code below:

function LocationChange(url){
       outputlog("in location change");
       url = decodeURIComponent(url);
       outputlog("Checking location: " + url);
 
       jso_checkfortoken('facebook', url, function() {
           outputlog("Closing InAppBrowser, because a valid response was detected.");
           inAppBrowserRef.close();
            
       });
         
   };

to

function LocationChange(url){
       outputlog("in location change");
       url = decodeURIComponent(url);
       outputlog("Checking location: " + url);
 
       jso_checkfortoken('facebook', url, function() {
           outputlog("Closing InAppBrowser, because a valid response was detected.");
           inAppBrowserRef.close();
            
           window.location.href = window.location.href.replace('index.html', 'my.html');
            
       });
         
   };

Where my.html would be the page you want to open from your app. Note that it has to be where your index.html file is in order to match the path.
You can debug the code using the Simulator or on device in order to find what the code is doing and spot the best place to edit.
You may also find interesting our AppBuilder Friends template where multiple login forms are implemented.
Thanks.

Regards,
Zdravko
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
Tags
General Discussion
Asked by
Leonard
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
Leonard
Top achievements
Rank 1
Share this question
or