Open a wechat mini program on top of another mini program - wechat

Consider there are two authenticated WeChat mini-programs. Can I open a mini program on top of another mini program using an iframe?- Not using navigateToMiniProgram API but I am asking like embedding one on top of another.
I have searched the documentation and a few other blogs/white papers. I was not able to find anything relevant to it.

As far as I know, it is not possible to embed a wechat page inside another.
The best way I found to simulate this behavior was to create a component with the elements that I need to embed so that I can use it anywhere.
Suppose you have a login page that you can show if you go to the login page as such or you want to have a sidebar in case the user has not logged in.
You create a component with the login (I'm going to put a pseudo code, now I don't remember the wechat syntax well)
<view>username</view>
<input name='username'></input>
<view>pass</view>
<input name='pass'></input>
Then in your page where you want to embed said component you just add the component.
<view>
<!-- login component -->
<login-component></login-component>
</view>
I hope this helps you

Related

Can I submit a form with google's recaptcha in it from my app?

I'm writing an app which involves letting users to share comments on a website, which has a comment form with Google's reCAPTCHA embeded. I would like to load this page via HTTP and display CAPTCHA within my app, so that user can post comments from my app. Is it easy to implement or should I rather try other solution?
EDIT:
I've red reCAPTCHA developer guide. If I would like to embed captcha inside my form, I'd need to insert div element with a proper class, and make a ajax request in order to render captcha. This call would insert an iframe into a given div. What I need is to know how to access that iframe's content without using AJAX.
Turns out we are not supposed to do that kind of tricks with reCAPTCHA.
There is no support for that in API. It seems that it was part of Google's design to prevent that kind of usage.
The only walkaround I could come up with is to implement a WebView widget with JavaScript support, get website via http, and load it into this webview, centering this view around the form we want to post.
It seems like a lot of work though, thus I'm going to simply skip this, if someone successfuly manages to figure it out I'd appreciate a hint :)

Resize facebook share button

I would like to resize the facebook share button. The default one provided by facebook is ridiculously small, and I am having difficulty resizing it. I tried overwriting the class, and even adding an ID, but nothing that has achieved desired result.
I mean below is the facebook share button:
<div class="fb-share-button" data-layout="icon"></div>
any help would be greatly appreicated, and please note that it also has to look good on mobile, i just need more flexibility in customization.
The Facebook Share button does not directly allow you to modify the style of the button. However you are able to create your own share button which will allow you to customize this to reflect the feel of your website.
For example for you can utilize the Javascript SDK to spawn a share dialog like so:
FB.ui({
method: 'share',
href: 'https://developers.facebook.com/docs/',
}, function(response){});
You can also use a URL redirect and link this with your custom button.
https://www.facebook.com/dialog/share?app_id=145634995501895&display=popup&href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer
Please reference the following documentation for further details on the implementation: https://developers.facebook.com/docs/sharing/reference/share-dialog
However please ensure you adhere to the Facebook Brand Guidelines outlined here https://www.facebookbrand.com/

Is There a way to customize the IN/Company link for LinkedIn

I have inherited some code which uses uses the LinkedIn Company Profile API. At least that's what I think it is. Basically a script tag is rendered in the following format:
<script type="IN/CompanyProfile" data-id="9999" data-format="click"></script>
This together with .js file creates a link with the Linked-in logo which when clicked on reveals profile of company. Question is, can I customize the link. I want to add some text to the right of the linked in logo. I couldn't find any relevant documentation on it. I added a span tag with some text and attempted to wire up the click of the span, so that when clicked it clicks the linkedin icon. That doesn't seem to work-- which I found rather odd.
Any thoughts?
The Company Profile plugin builder is here:
https://developer.linkedin.com/plugins/company-profile-plugin
Customization of this plugin is limited to width (using data-width) at this time because of the complex layout. However, you could build something similar using the Javascript API if you need something more customized to your system.
This is another option that is more customizable, but has less interactivity:
https://www.linkedin.com/profile/profile-badges

How to add Facebook Like button to a Flex app?

I am working on a Flex AS3 application and wanted to add the Facebook Like button inside the app. I am unable to find any API or anything apart from the http://developers.facebook.com/docs/reference/plugins/like code generator.
Any ideas on how this might be accomplished? I am quite new to the recent changes in the Facebook Platform, so any info would be appreciated.
A direct "like" button should not be possible, since Facebook needs to sandbox the whole thing. Both like button formats (iframe and xfbml) use a sandboxed iframe, so nobody but facebook can set "likes" or know anything about the user.
For that to work with Flash, I think facebook would have to provide the button itself as a SWF file so you can load it in Flash. Then it can create a sandbox within itself and thus load the user information safely. Very much like the Chromeless Youtube Player, where it's almost impossible for Flash to access the actual FLV URL (even through introspection).
But even so, I don't think this would provide enough security... realize that you are dealing with very private user information and credentials here.
The only way I know you can "like" stuff through Flash is first doing the whole Facebook Connect thing (several popup windows asking the user for permissions) and then using the API of your choice to do the actual "liking", for instance, with the Graph API:
http://developers.facebook.com/docs/api#publishing
The closest information I could find are these 2 items so far. Hope it helps you in your journey.
Facebook Developer Site: Source
Facebook like button in flash
I hate answering "no" to a question because what I really mean is "I don't know and I can't find a way". I'm sure your Google-fu is as good as mine. All I can see are Facebook forum posts like this where people are asking the same question and no one is answering.
The examples they give of the like button are either embedded in iFrames or using XFBML <fb:like ../> tag. There are no examples of how to like something using their new graph api or either of their old APIs (FQL and REST API).
I had to get a Facebook like button in a html page (looked like a header on the top) and get the swf embedded below. As its a complete flex app in my case, this work around was possible and plausible

How do I login in with facebook connect in a flex application

I've been checking out facebook connect stuff from the new actionscript 3 library from Adobe. I have been trying to figure out how to use the facebook connect button inside of a flex app.
In an html page you would us the fbml and it would automatically put the facebook connect button on your page and when the user clicks on it it pops up the face div and lets the user login. Well you can't use that in flex. So I could put it on the page containing the swf but, that's why I'm using flex and not html. I've seen it done by the guys at Universal Mind so I know it's possible. I just need a little direction.
I know the function to use in the facebook connect api to cause that login dialog to come up I just can't figure the correct combination.
Chcek out the Create your first Facebook application with Flex tutorial and in particular the section on Add Facebook login.
This should be applicable to Flex. This would be done using the ExternalInterface calls from within Flash.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
In Adobe facebook-actionscript-api there is a class LoginWindow which you can use.
When you need it this window will open like small flash popup window and it will display facebook login page and enable user to login. All needed events will be raised and you should be connected after that. I didn't tested it but from the code looks like what you need.
this developer created this js/flash bridge you are talking about using the ExternalInterface classes. you can download all source files as well. i found it very useful.
http://www.wellconsidered.be/blog/2009/01/04/facebook-connect-to-actionscript-3/
There is also a very clean and elegant solution/tutorial at:
http://www.stevenvh.be/blog/?p=57
Use this API:
http://code.google.com/p/facebook-actionscript-api/
Look at ConnectDemo.
The sample kind of sucks... it forces you to connect before showing the Flex app.
You need to tweek the example to get it to do what you want.
Also, FB depreciated some of the methods, so you have to look up new methods that aren't depreciated.
I'd love to update the sample, but I don't have the time to dedicated to another project.

Resources