After submit need thank page to scroll to top in FB tab - facebook

I am working in ShortStack, makes custom FB tabs/pages. I searched like crazy, I saw tons of answers but none that address a non-traditional iframe. I didn't create the iframe, Shortstack did. I put my webform code in. After submit, does not go to top of next page.
Any suggestions as to type of code I could use? Shortstack support will not help since it is custom code I am putting in.

FB.Canvas.scrollTo(0,0);
You can use this to scroll to the top, just place it inside a code widget in the shortstack designer.
https://developers.facebook.com/docs/reference/javascript/FB.Canvas.scrollTo/
Example:
$('#promotion').bind('success.form', function(event) {
FB.Canvas.scrollTo(0,0);
});

Related

Why doesn't RouterLink take you to the top of the new page but a regular HTML link does when both compile to the same HTML?

I have <router-outlet [routes]="Routes.all"></router-outlet> set in my app component. I have a page with links at the bottom of the page. If a user clicks a link I want them to be taken to the top of the new page.
If I use RouterLink the current scroll position is retained so the user lands in the middle of the new page.
<a [routerLink]="RoutePaths.featurePage.toUrl()">...</a>
If I use a regular HTML link, I get the behavior I want, the user lands at the top of the new page.
...
What I really don't get is how they can respond differently yet compile to the exact same HTML code.
<a class="_ngcontent-zbb-0" href="/feature-page">...</a>
What am I missing here?
I understand regular non-Dart Angular has something called scrollPositionRestoration but it doesn't seem to exist for AngularDart.
The answer is really a hack to return the scroll position by utilizing the
window.scrollTo(x,y) function.
This issue was raised in here in regular angular
Equivalent to autoscroll=true: automatic scroll to top when route changes
remmeber to import dart:html

A few questions regarding the Facebook like button on external websites

I am working on a project where I need to manipulate the button in a few ways.
Is it possible to just have the button and not the 'X people like this' text after it?
Does it have to be for one's own page or can it be easily configured, e.g. can I have a button that when clicked likes the fan page for Coca-Cola?
If so, is it possible to get the pop up when you hover over the button, like the pages down the left hand side on https://www.facebook.com/Google
Thanks very much in advance for your help. Please let me know if I have been unclear.
You could try the button_layout layout, which just has the little speech bubble with the number of likers. If you don't like that, you can cut that bubble off by setting the width of the parent container to less than the width of the button.
You can use whatever page URL or web page URL you want.
Hovercards aren't available on fb:like right now, but might be at some point.
More documentation here.

Resize iFrame in facebook fan page

I want resize the iframe height of my tab page. I am trying FB.Canvas.SetSize method, also I try with jQuery and javascript resize the iframe but donĀ“t work.
My application is not a Canvas.It is a tab page so i think "FB.Canvas method should not work with tab page".
How could resize my tab page on facebook profile?
How could drop the iFrame scrollbars on tab page?
Excuse me I also need to know if I could modify the share button with a custom image.
Thanks in advance
Provide some code
Make sure you have the Canvas Height option is set to Settable under the App Advanced Settings
Use asynchronous Loading of your JS-SDK and put your FB.Canvas.setSize(); inside the fbAsyncInit function
Please note that the fbAsyncInit function may fire (and hence your FB.Canvas.setSize();) before all images of your page are loaded! which means actual height of page is not reached yet!

adding facebook like and tweet buttons to an exhisting tumblr theme

I am trying to add facebook 'like' buttons and tweet buttons at the end of each blog post on my tumblr blog. I used the 'minimalist' theme on tumblr. Ive tried just about every method to insert the html properly and nothing has worked. Below it the current full HTML that I am using. If you go to my site right now there is a facebook button and it actually works but there is a ton of blank space underneath that I cant get rid of. Also, it works in Safari but not Firefox which is odd. The fbook code is right before {/block:posts}. I've been able to look at other formats of buttons but they either like my entire page rather than individual posts or I have this same spacing/firefox issue. Can anyone help?
</div>
</article>
Comments
{/block:Posts}
I cant even get that. I've done this task a few times before with other themes and it is no problem at all. It sounds like you didn't uncheck the boxes on Facebook that enable the big black space go back to f.b. and get a new code made from the link page. Do not forget to uncheck the unneeded stuff or that will also be embedded in the code given you.

JQTouch animation flicker

I have been working a JQTouch app. The functionalitly is correct however my animations on some menu items flicker, especially when you click a back link. The strange thing is it is only on certain menu items.
All pages are loaded in the same way via AJAX.
Can anyone shed any light on this?
site can be viewed at:
http://www.alliancerail.co.uk/ip/iphone.html
Thanks
Chris
I think you have an extra closing </div> that appears after "about" and right before "gnwr." Not sure if this will end up fixing your flicker problem...
You are loading content dynamically. Sometimes the jqt animates to the new page before that page has content. Try including more content in index.html such as the about or contact pages. You can also write your own ajax routines that get fired from onClick events bound to the anchor tag on your home page.
The goog group is a great resource -> https://groups.google.com/forum/#!forum/jqtouch