Sharing to WeChat: WeixinJSBridge is undefined - wechat

I'm trying to implement sharing to WeChat on our site.
Accordingly to docs, I have to load SDK from http://res.wx.qq.com/open/js/jweixin-1.0.0.js, configure it, and call corresponding methods (onMenuShareAppMessage in my case).
I did all configuration, it seems that it's ok (no errors displayed, wx.ready() callback is executed), but when I call wx methods, nothing happens at all.
Reading SDK code (minified), I can see that everything is wrapped in constructions like window.WeixinJSBridge ? WeixinJSBridge.doSmth() : doNothing(). In my case WeixinJSBridge is undefined.
But what is that WeixinJSBridge and where should I get it? It's not described in docs. Googling it gives some pages on Chinese with same question – "WeixinJSBridge is undefined" and with no answer.
How to properly work with all this stuff?
Or, maybe I'm totally misunderstand the docs and sharing to WeChat from website is impossible at all? Please somebody explain.

Understood. That SDK is only for WeChat browser, built-in inside their mobile application. For other browsers SDK has no sense.
So yep, normally it's impossible to share content to WeChat from website.

WeixinJSBridge is an object available once http://res.wx.qq.com/open/js/jweixin-1.0.0.js is loaded inside the Wechat Web Browser.
It's used specifically to start the payment process in Wechat App.
If you wanna test/debug it, download the wechat testing software for desktop here: https://mp.weixin.qq.com/wiki?action=doc&id=mp1455784140

Related

How to develop a web browser using c# .net using installed.net libraries and without using the web browser control?

I have searched the internet for 2 days having found no answer to the below requirement. What i found most were GeckoFX and CefSharp which are external packages and not installed libraries. How can this be done?
I have been asked to do the following:
Use a suitable library function out of the set of libraries installed with the .NET platform. You must not use the C# WebBrowser class but perform the required HTTP-level communication directly from within your code. The code must clearly identify the HTTP-level client-server communication and must explicitly manage Home page, Favourite, History Lists and Tabs.
Optionally, you may add functionality to render a web page, but there must be an option to disable this functionality and to show only the raw HTML that has been retrieved.
Thanks
What have you attempted so far and what problem are you encountering?
Maybe read this first :)
Currently it sounds like you have been given an interview or homework task that you dont know how to solve. If so, then you should have some idea on where to start or you are in the wrong course or job interview. If you want help, then try to solve the question yourself and ask for help when you are stuck. Tell us what you have tried, show the code you currently have and let us know where you are stuck or what doesnt work as expected.
Where are you stuck? Fetching the webpage? Building the user interface?

Can the telegram auth SDK be used within a browser

I'm struggling to get my head around the basics, and to find somewhere to ask for help. I know that the first two questions are a bit wooly by Stack overflow standards.
is there a forum/channel somewhere for a dialog with people trying to use MTProto?
is https://github.com/zerobias/telegram-mtproto the easiest to use implementation of MTProto in JS?
can it be used in a web client (i.e. with and ES6 import in a webpack environment)?
I'm seeing a bunch of errors but some of them seem to do with using webpack 4, but I'm not sure if what I want to do is even possible (see Accessing Telegram API via web-based client), although I have now mananged to get a 2FA code sent
My aim is to create a client that can log into certain telegram channels where all the content comes from a bot, and to parse information from them
Connecting to the Telegram MTProto API is possible in browsers. You should use a library to do that. I'm going to mention some functional and maintained libraries.
There is the official TDLib with browser support, but it is quite hard for newcomers to use.
There is also GramJS which works on both Node.js and browsers, has type declarations for TypeScript and an easy-to-use API. It also take cares of many things like caching entities, so you do your work even faster. You can even change the lib target to use as an ES module in the browser.
is there a forum/channel somewhere for a dialog with people trying to use MTProto?
You can consider joining #gramjschat.

_satellite.Logger.getHistory() is there similar command for adobe launch?

I need to see all rules fired on the page. Earlier I was using "_satellite.Logger.getHistory()" from console to get all rules but it doesn't seem working anymore with Adobe Launch product. Appreciate your help.
https://forums.adobe.com/thread/2473084
thanks,
Raj
No, but an API is available to collect similar information. See https://medium.com/launch-by-adobe/launch-library-monitoring-hooks-8495dd91b57. Note that these APIs are for debugging purposes only; you shouldn't use them in production code.

Basic authentication with StageWebView

Is there a way to perform basic authentication using StageWebView on mobile devices in Flex?
The problem is that mobile (iOS, Android) implementations don't provide authentication dialog and documentation about this is pretty unclear.
On this link:
http://helpx.adobe.com/air/kb/stagewebview-differences-platforms-air-sdk.html
it's suggested to use URLRequest as a workaround, but I already have URLLoader that successfully authenticates and loads data from the same service and it doesn't affect StageWebView.
I'm having the same issue. The problem is after authentication (after the app install page through facebook), it goes blank. I at least found that the url is "m.facebook.com/dialog/permissions.request" and then continues with a massive amount of get variables.
From my research, I believe this is a pop-up window that runs an auto-close function but doesn't seem to work in Adobe AIR. I've tried running a TimerEvent in a "LocationChangeEvent" to nav back (have to run 2 back to back because the webViewObject.historyBack() method does not support parameters), and this works but only after the app has been installed on their facebook account successfully which in turn affects the ability to even install it to their Facebook in the first place.
I also tested reading the url to trigger callbacks but the one major problem is the "Install" page and the "login successful" page have the EXACT same url entirely, at least from start to finish. Haven't tested the title yet due to my frustrations lol...working on that.
If anyone has any suggestions, this would be supremely helpful and seriously appreciated!

Is it possible to build an application for the LinkedIn platform?

Do you know if it's possible to build an application for the LinkedIn platform?
Yes, they have API at http://developer.linkedin.com/index.jspa, allowing access to the profile, connections, messaging and more.
While LinkedIn has promised a public API for a very long time now, they have yet to deliver.
No, there is no public LinkedIn API yet.
IMO, their widgets (which there are only two of at the moment, which are very limited) don't count.
They say that they are open to being contacted with specific uses for their API and they may give access to parts as needed - but that is if they accept your ideas for integration. They have been very picky with this - and have not accepted my attempts to integrate with LinkedIn yet, they tell me I have to wait with everyone else, apparently my applications are not "high-profile" enough.
Sure, you'll find many Google results talking about their "promised" API, but they are empty promises and won't be of much help.
Yes, Linkedin has an API:
http://www.programmableweb.com/api/linkedin
http://blog.linkedin.com/blog/2007/12/the-intelligent.html
So you could build an application that uses it.
Update: (from second link)
We’ll be phasing all of this in over the coming months and to get involved with the Intelligent Application Platform either for APIs, widgets, or hosted applications, send us an e-mail to developers#linkedin.com telling us what you want to build and what you need to build it.
Since there are published Mashups using LinkedIn I would assume that means you can use the API even if the documentation isn't readily available.
As a tip, in the future include links to what you found that didn't work, so we know not to give it to you again.
I poked around a bit more and I found some more on their widgets which appears to be the main focus of their API.

Resources