Solved

google picker popup --blocker

Posted on 2014-12-08
2
273 Views
Last Modified: 2014-12-13
Hello,
  I have implement the Google picker on my page. However, on the Iphone and other device the user need to  disable popup blocker on the browser.  Is there any method to bypass this manual setting

Here my code on the button click
 gapi.client.load('drive', 'v2', null);
            gapi.load('auth', { 'callback': onAuthApiLoad });
            gapi.load('picker');
            function onAuthApiLoad() {
                window.gapi.auth.authorize({
                    'client_id': data.clientID,
                    'immediate': false,
                    'scope': ['https://www.googleapis.com/auth/drive']
                }, handleAuthResult);
            }
 var oauthToken;
            function handleAuthResult(authResult) {
                if (authResult && !authResult.error) {
                    oauthToken = authResult.access_token;
                    createPicker();
                }
            }
            function createPicker() {
                var picker = new google.picker.PickerBuilder()
                    .addView(new google.picker.DocsView())
                    .setOAuthToken(oauthToken)
                    .setCallback(pickerCallback)
                    .build();
                picker.setVisible(true);
            }
function pickerCallback(data) {
            //function pickerCallback(data) {
                if (data.action == google.picker.Action.PICKED) {
                  
                    var doc = data.docs[0];
                    var fileId = doc.id;
                    var request = gapi.client.drive.files.get({
                        'fileId': fileId
                    });
                    request.execute(function (resp) {
                        var token = gapi.auth.getToken();
                       
                        var fileData = {
                            name: resp.title,
                            link: resp.downloadUrl,
                            accessToken: token.access_token,
                            tokenType: token.token_type,
                            mimeType: resp.mimeType
                        };
                    });
                }

Open in new window

0
Comment
Question by:SiemensSEN
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40486789
Is there any method to bypass this manual setting

No, of course.
Maybe open in a css popup
0
 

Author Comment

by:SiemensSEN
ID: 40497818
I see some sites like career builder.com that include drop box and they seems to have some method to work-a-round this issue
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question