Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 14
Registered: ‎03-29-2011
My Device: 8900
My Carrier: CMCC

WebWorks powered app won't load resource if url contains "@" character.

Even  access element for some domain has been added to the config.xml,

system would throw an alert and won't load resource if url under the same domain contains "@" character.

 

This error happened on dev alpha simulator when doing o-auth with instagram.

Instagram login page contains resource using "@" character.

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: WebWorks powered app won't load resource if url contains "@" character.

[ Edited ]

Try escaping the @

 

e.g.

 

var hasat = encodeURIComponent('fred@example.com');

 

 

[Pinched from Wiki]...

 

List of allowed URL characters

Unreserved

May be encoded but it is not necessary

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 - _ . ~

Reserved

Have to be encoded sometimes

! * ' ( ) ; : @ & = + $ , / ? % # [ ]

 




Click the like button if you find my posts useful!
Contributor
Posts: 14
Registered: ‎03-29-2011
My Device: 8900
My Carrier: CMCC

Re: WebWorks powered app won't load resource if url contains "@" character.

Thanks for reply.

 

I can't encode it.

It happened in the o-auth 2.0 processing.

The url including "@“ is used by Instagram login page. Not under my control.

 

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: WebWorks powered app won't load resource if url contains "@" character.

Can you gimme an example URL (fake data) - not familiar with Instagram so I can see the URL makeup

 

 




Click the like button if you find my posts useful!
Contributor
Posts: 14
Registered: ‎03-29-2011
My Device: 8900
My Carrier: CMCC
Contributor
Posts: 14
Registered: ‎03-29-2011
My Device: 8900
My Carrier: CMCC

Re: WebWorks powered app won't load resource if url contains "@" character.

The process is:

1. My app start an authorize request and visit instagram login page.

2. Instagram login page shows. Users input username and password.

3. Instagram return to my app with an access token.

 

Step 2 is out of my control.

 

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: WebWorks powered app won't load resource if url contains "@" character.

Just replace any @ with %40

 

e.g. Your first one works fine ...

 

https://d36xtkk24g8jdx.cloudfront.net/bluebar/602d1e9/images/branding/glyph%402x.png




Click the like button if you find my posts useful!
Highlighted
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: WebWorks powered app won't load resource if url contains "@" character.

Yeah - after you do the auth req you get the token back and use than in requests I guess

 

I take it this is the bit with the @ in it

 

So just change the @ in that string to %40 in any URLs you request

 




Click the like button if you find my posts useful!
Contributor
Posts: 14
Registered: ‎03-29-2011
My Device: 8900
My Carrier: CMCC

Re: WebWorks powered app won't load resource if url contains "@" character.

No, after auth I only get a token string. I don't request any resources contain @.

Rsources contains @ are used  in login page only. 

 

I think it's impossible to solve it under WebWorks url rules.

 

Any way, thanks to your support.  

For developers, blackberry is the best and most friendly.

 

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: WebWorks powered app won't load resource if url contains "@" character.

The obvious thing to try is Ajax as that may well bypass whatever's getting in the way

 

A lot of their API looks very much like JSON

 

Sorry - can't gt into it further today, bit busy getting ready - Jam 13 flight very early in the morning Smiley Sad




Click the like button if you find my posts useful!