I'm using, but not married to, the feed dialog to share to a users wall on facebook.
var obj = {
method: 'feed',
to: shareTarget,
from: shareTarget,
link: 'myLink.html',
picture: 'myPic.jpg',
name: 'auto populated if left blank',
caption:'also auto populated if left blank',
description:'again, also auto populated if left blank'
};
FB.ui(obj, callback);
The feed dialog contains/displays several params which I would prefer not display. However, when I remove the 'description' or 'caption' field from the above code they still appear in the feed dialog, displaying auto-generated copy such as 'apps.facebook.com'.
I've shared items to walls that do not contain these fields but can't figure out how it's done.
For example, this polling app will display only the few fields it needs with no description or caption (https://apps.facebook.com/my-polls/).
Any insight is appreciated.
I had the same issue and I found that putting a space in the description field instead of leaving it blank worked.
Related
I have created the button in the gmail inbox using inboxsdk.
Now i want to get a pop up by clicking on that button
2.Pop up should contain a link which navigates to my website page(xyz.com/login.php)
How can i do these using inboxsdk
Screenshot:
If you are still struggling with this, I would suggest a simple solution which is to fire a JavaScript confirm dialog see here. On confirmation you could redirect the user, using window.location.href = '<your-url>';.
Another solution would be to use InboxSDK's widgets.
Example:
InboxSDK.load(2, '<InboxSDK-app-id>').then((sdk) => {
...
const el = document.createElement('div');
el.innerHTML = 'Link description';
sdk.Widget.showModalView({
title: 'Modal Title',
el
});
});
For more ModalOptions look here.
Notice: I set the attribute target attribute of <a> tag to "_blank". This makes sure the url opens in another browser tab.
A third, more direct (optional) solution would be to add an onClick event listener to which you attach a function that redirects the user to your url, see a code example here.
A fourth and better possible solution would be to add a DropdownView to your button's onClick function, see example code here.
How do you customize the text in the lower-left hand corner in the Facebook Feed Dialog, as shown in the attachment? Or is that text part of the icon? If so, then where do you upload the icon in Facebook? Haven't had any luck finding directions.
You just have to use actions parameter in your Feed Dialog code to make such text appear below the icon as you have mentioned. Check out the feed dialog parameters here
You have not mentioned anywhere in the question, which language are you using, but if you are using-
Javascript SDK-
actions: {
name: 'Join dropbox',
link: 'http://url.com'
}
PHP SDK-
'actions' => json_encode( array(
'name' => 'Join dropbox',
'link' => 'http://url.com'
))
Hope that helps! :)
I am currently working on a website..
I need the following functionality:
I have several categories for colors and photos that relate to these categories
category examples:
red
green
blue
orange
purple
yellow
I am trying to make a form on my wordpress HOME page that will allow me to check a category and then filter my current displayed posts by that category.
I would like to remain on the home page during this process
I would also like to figure out how to eliminate the "submit" button and have the form submit every time a box is checked or un-checked.
I am using the latest version of wordpress and the twentytwelve theme
So far this function will filter post by category:
function filter_color( $query ) {
$query->set( 'cat', '2' );
}
add_action( 'pre_get_posts', 'filter_color' );
I am just not sure how to create the checkboxes that will trigger the filter. I do not know where my form should "submit" to (index.php?) and I'm not sure how to get the submitted data to show up. Also, I would like ALL boxes checked by default and the form to save the data as color options are un-checked or re-checked.
Please, any links to good reference materials and any help with this would be greatly appreciated as I have been stumped currently.
Thanks in advance!
I'm trying to customize the appearance of a facebook 'Send' button.
I generate the button using the code provided in the docs, however I don't have a clue of how I could modify the button's image or text ?
Could anyone give me an example? I guess javascript is my only option here?
My code looks like this right now:
<fb:send href="http://www.mywebsite.com/something"></fb:send>
This generates a button that looks like this:
Thanks!
You cannot customise the <fb:send /> button. However, you can achieve the same functionality using FB.ui (http://developers.facebook.com/docs/reference/javascript/FB.ui/). Use the send method, eg.
FB.ui({
method: 'send',
name: 'People Argue Just to Win',
link: 'http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html',
});
You can always create your own link and style it however you wish, then add the link from this list of all social sharing button links list - this works for sharing to all sorts of social sites.
For Facebook's share link, replace [URL] and [TITLE] with your data using urlencode()in the following code in your link's href:
http://www.facebook.com/share.php?u=[URL]&title=[TITLE]
You're pretty much SOL when it comes to customizing these Facebook buttons. They have intentionally designed their buttons so that you can't change or customize them beyond the limited scope provided by Facebook.
Facebook's send button is in an iframe. If you wait for the iframe to load, you can select its contents with $('iframe').contents(). So replacing the text would look like
$(function(){
$('.fb_iframe_widget iframe').on('load', function(){
$(this).contents().find('.pluginButtonLabel').text('Custom Text');
});
});
I would like to display a facebook-like button within the Fancybox popup.
The interaction I'm imagining is similar to how Pinterest displays the social sharing buttons to the right of a modal popup (e.g. http://pinterest.com/pin/73465037641354472/). Each image has a unique url so that you can link to the content of the popup directly.
How can I:
Ensure that each image within my Fancybox gallery is attached to a unique URL
Display a Like button in the popup linked to that unique URL
For #1, I found the following code discussed in the following page: this.id inside of fancybox
$("a.fancybox").each(function() {
var element = this;
$(this).fancybox({
'titleFormat' : function() {
var astring = '<span>' + element.id + '</span>';
return astring;
}
});
});
Is this the code that I need? If so, what do I do in the HTML in order for this JavaScript to work properly?
Thanks so much for any help!
You will need to have a mechanism that based upon a unique URL to serve off the correct http://ogp.me og: meta tags to be parsed by Facebook's linter.
Remember the linter does not run javascript, so they will need to be correctly defined in the response stream.
EDIT
Example of each image having it's own URL. These will aid in Facebook being able to get the correct html and og: tags.
http://example.com/images.php?id=1
http://example.com/images.php?id=2
http://example.com/images.php?id=3
Within the HTML response from each of those unique URLs, the correct og: tags are specified. Within that HTML you should have a javascript redirect to the actual page to display the picture. Since javascript wont be run by the linter, the linter should be able to read those og: tags.
See http://ogp.me for how to specify og tags.