Is it possible to use FB share plugin without APP ID?
If I use HTML5 code then the console logs an error FB.getLoginStatus() called before calling FB.init().
To use HTML 5 FB like is it necessary to have an APP ID?
Thank you
Here i am sharing what i did to share post on fb wall, In this way you do not need to use appId. Just put this code in your HTML page where you want link to share...
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u={$url}&media={$imgPath}&description={$desc}" class="joinFB">Share Your Advertise</a>
URL parameters are as explained below,
u : url or link you want to user to go when he clicks on your wall post,
media : full image path,make sure that image is available on given path,it will accept one image only
description : a short description that you want to show on wall
It will also ask you to write some data which will be displayed above your post. Description passed in url will be displayed in right side of your image.
Please note that i had passed $url,$desc,$imgPath variables as per my need. The above code is in smarty-php, so change it as per your requirement.
Hope this becomes helpful to you.
Yes you need an app id. You can try to inject your own code into the DOM of the user when using facebook and call functions in their javascript... But I doubt many users will actiually use an "app" that works this way.
Related
I was trying to access content through previews. At first, this was fine with both Preview and non-preview views, but I moved some of my code to another branch and noticed issues. I remembered seeing http://localhost:63761/1120 work, but now: I'm not sure if this is the correct form of address for content under 1120 to appear. Is there something I need to check?
Postfixing your url with an id is a quick way to look up the content of a node:
For example the following url works in my environment, but is not user or search engine friendly https://localhost:44392/1141
When I look up the node in my umbraco backend: https://localhost:44392/umbraco#/content/content/edit/1141
Navigate to the Properties tab and look for "Link to document", that's the user friendly url for the node
If I understand your question properly, the urls should be like below
Non-preview mode url -
http://localhost:63761/umbraco#/content/content/edit/1120
Preview mode url -
http://localhost:63761/umbraco/preview/?id=1120#?id=1120
Thanks
I am at a bit of loss of knowledge and honestly don't know what to search for. What I need to be able to do is determine what content to show on a webpage that way when I refresh it will not reset everything. For example, if someone clicks on the messages tab I want the browser to know when it refreshes, that is the tab to stay on. I believe this is done through url encoding but I am not sure. Any help would be AWESOME! Thanks fellow coders.
MORE INFO: I have 2 buttons on a page. One is named "home" and when I click it I want the content of the home page to appear in a box named "info-main". I am doing this with ajax requests. When I click on "edit profile", I want the content in div id "info-main" to be replaced with the edit profile information that is retrieved via ajax as well. I need to figure out how if someone refreshes the page... I want it to stay showing the edit profile information rather then going back to the default of "home" content.
MORE INFO(AGAIN)
I just had a great idea. When the page refreshes, I want it to load specific ajax code based on what the url encode is.
For example.... if the url is:
http://www.exampleurl.com/index.php?info=status-load
I want the browser to execute the ajax I have for retrieving status's.
OR
If the url is:
http://www.exampleurl.com/index.php?info=edit-prof
I want it to load the ajax code I have for retrieving profile edit info.
I really hope this helps. :/
The way I do it is I place a # before the link i.e. href="#messages"
Then I link a .js with this code.
$(function () {
var hash = location.hash
, hashPieces = hash.split('?')
, activeTab = $('[href=' + hashPieces[0] + ']');
activeTab && activeTab.tab('show');
});
I hope this helps
For referring an element on your page, you use a link with a hashtag.
For example, if you have a layout like this:
<div class="top-nav">
Home
Edit Profile
</div>
And you have a password edit form on your editProfile page, you can like to it like this:
Edit Profile
if you have a <form id="passwordChange"> on your editProfile.
Read more: http://css-tricks.com/hash-tag-links-padding/
This is a webpage with a number of "subpages" embedded in ajax for all the user reviews.
http://www.goodreads.com/book/show/13636400-the-bone-season#
I am trying to get the specific URL for particular pages (say ?page=4), so I can point people to particular reviews directly instead of going to the page and clicking on page4. below is a snippet from the source code for that page:
<a href="#" onclick="new Ajax.Request('/book/reviews/13636400-the-bone-season?page=4', {asynchronous:true, evalScripts:true, method:'get', parameters:'authenticity_token=' + encodeURIComponent('XsOgyhAC4p0tAm8wGIqTQGY+PxGpDieI45AYry0NlE4=')}); return false;">
when i type http://www.goodreads.com/book/reviews/13636400-the-bone-season?page=4, i get a blank page.
What do I need to do get the page to show? Thank you!
You can get the url for the specific reviews, but I was unable to find anyway to do so for the "page". If you want to direct someone to a specific review, then you can get that url from the "see review" link or the date link on that particular review.
New answer: you need to submit a GET request (using cURL for example) with the parameter mentioned ('authenticity_token=' + encodeURIComponent('XsOgyhAC4p0tAm8wGIqTQGY+PxGpDieI45AYry0NlE4='), and parse what is sent back. Then you'll get your review. Linking to it is not possible unless you find a URL where your review is always displayed.
I am working on a website that will marketed in China, and I would like to know if there is a method to create "share" buttons for Renren (Similar to Facebook), Weibo (Similar to Twitter) and Baidu Like (Similar to Google's +1) using only HTML.
For example, for Facebook, Twitter and Google's +1 you would use the following:
http://twitter.com/share?url=http://example.com&text=Description
http://www.facebook.com/sharer.php?u=http://example.com
https://plusone.google.com/_/+1/confirm?hl=en&url=http://example.com
I know that Renren uses the following:
http://share.renren.com/share/buttonshare.do?link=http://example.com&title=Description
However, I would love to know what the HTML only URLs for Weibo and Baidu Like are.
Here is the documentation for the Javascript version of the share buttons if that helps:
http://wiki.dev.renren.com/wiki/Xn:share-button
http://open.weibo.com/sharebutton
http://share.baidu.com/like/get-codes
Hopefully this can help someone in the future; here is how to implement HTML only share/like buttons for Renren, Weibo, and Baidu Like/Space/Forums/Bookmarks:
Renren
As mentioned above, use the following URL format to share a link on Renren:
http://share.renren.com/share/buttonshare.do?link=http://example.com&title=Description
Weibo
The following URL format will allow you post to your Weibo account, in the same manner as you would for Twitter:
http://service.weibo.com/share/share.php?url=http://example.com&appkey=&title=Description&pic=&ralateUid=&language=zh_cn
Baidu
Baidu has multiple services that can be posted to; the one relevant to this post is Baidu Like, but I have provided URLs for Baidu Space, Forums, and Bookmarks for reference as well:
To like a link in in the same manner as Facebook/Google +1, using the following URL structure:
http://like.baidu.com/set?buttontype=small&cb=bdShare.ajax._callbacks.bd4bb141b&index=0&url=http://example.com
I tracked the above URLs down using a packet analyser, and as far as I can tell, Baidu Like has to be called from the referring page, or at the very least, the referring domain. The callback function bd4bb141b does not seem to be specific to any domain or user ID.
Please note that I have not tested the following URLs structures thoroughly:
To share a link on Baidu Space, use the following URL structure: http://apps.hi.baidu.com/share/?url=http://example.com&title=Description
To share a link on Baidu Tieba (Forums), use the following URL structure: http://tieba.baidu.com/i/app/open_share_api?link=http://example.com
To save a link to Baidu Cang (Bookmarks), use the following URL structure: http://cang.baidu.com/do/add?it=Description&iu=http://example.com
Also for reference, a good Chinese alternative to FeedBurner is FeedSky.
With my own site (currently) the share button does not show up when using httpS ... but it does with http
Here is the link to the most recent (November 10th, 2015) Weibo share button code generator (scroll to the bottom to get the code):
http://open.weibo.com/sharebutton
We are trying to use either the facebook send social plugin, or the fb.ui send dialog. In both cases, we have found the link or href we pass to facebook only mostly works. There are 3 places a link is placed in the message and they are:
The title of the message
A link right below the title
an image to the left of the description
1 and 3 seem to respect the link parameter, but 2 is not. Here is an example of the code we are using:
FB.ui({
method: 'send',
name: 'Referral',
link: 'https://www.oursite.com/?refer=123',
picture: 'http://www.oursite.com/assets/images/logo.png',
name:'heres a name',
description:'description'
});
When this gets sent the link https://www.oursite.com/?refer=123 works for the name and the picture, but not the link output right below the name. Here is the code we're using for the social plugin which yields the same effect:
<div class="fb-send" data-href="https://www.oursite.com/?refer=123"></div>
This happens because Facebook doesn't use your link parameter: it uses the og:url meta of the page you want to share.
If you use the fb-send plugin, you can have a look to the data-ref attribute : it should do the job :)
You should also have a look here: https://developers.facebook.com/tools/debug to know what URL Facebook will use at the end.
Good luck