I want to add a like button to a page. I have an app set up, but it is sandboxed. If I init the api with the sandboxed app ID, will the like button still work?
Thanks
The Facebook Like functionality in your case is separate from the application in interest.
Like buttons can be linked to URLs or Pages without the requirement of a Facebook application. All referenced Likes, then, are passed over to the respective linked content and do not pass through an application to do so.
Good luck!
Related
I am working on a Chrome Extension which is structured like this :
the service_worker : fetches a list of compatible websites every day and if it is compatible, I will inject a 'widget' in the website
the widget : is a React App injected inside the page (a 300x300px position:absolute div) that can help the user and that is linked to the user account from my website, for example he can save a product from Amazon and see it later in his account in my website.
My problem is the communication between these two parts.
An example :
I want to check if the user has currently a session opened in my website, if yes, in the React App (the widget) I will render him some tools and his items, and if not I will render him a link to login in my website.
Tried solutions:
Call my website API directly from the widget : but I dont want to make the verification from the widget because it is a part of the webpage and I am afraid of a cookie/token hijacking (tell me if i'm wrong).
Using CustomEvents to get a response : I found this useful post, the problem is that as said in the 5th point I cant really wait for a response from the service_worker and store it.
Using CustomEvents with callbacks : I also can't send a callback function as said here.
Using sendMessage from Chrome API : To use this between webpage and the service_worker you need to specify in the manifest.json the pattern of every website that needs to use it, but the list can change every day. Also the domain cannot be *, and we cannot use <all_urls>
So, my communication is only working from the web page to the extension but not in the opposite way.
Can you advise me a way of making this work ?
Thanks !
I have a CMS backed web site where Vue.js was added to handle a UI feature of the site. The feature has tabs that switch content on the page. I need to make the tabs deep linkable as in there needs to be a way to have a certain tab set as active on page load. I can easily achieve this using a URL has but I would like to see if I can just use the Vue.js router. I haven't been able to find any resources to add the router to an existing site that isn't fully powered by Vue.js.
Is there way to add vue-router without any additional server configuation?
You could use Vue Router in the hash mode for history. Your URL would end up being something like www.example.com/post/1#tab1 and www.example.com/post/1#tab2.
One caveat, if SEO is important to this site, then you would need to do the routing on the server to make the page easier to crawl by Google.
I'm trying to add a share button or "feed dialog" as Facebook now seem to be pushing, to posts on my website. I'm basically looking for a way to simply allow users to click the button and be sent to the share preview page to post to their timeline or a friend's timeline etc.
The problem is that I don't really need an app (or at least I don't see the need in an app) and I'd like to avoid using their deprecated sharer url method.
What are my options? Can I use the feed dialog method without creating an app? I've tried going through their documentation but it just confuses me.
I'm not fussed whether it's JavaScript that opens a popup or if it redirects to a separate page (provided a redirect url can be provided to return users to the original page on my website).
you definitely need an app for the FB.ui feed dialog, but the user does not have to be logged in. Without an app, you can either use the sharer.php in a javascript popup, or you can use a like and/or send button. Just make sure to include Open Graph metadata in your page.
https://developers.facebook.com/docs/reference/plugins/send/
Be aware that you should also use an app (id) with the like or send button.
I wonder how one would monitor a single page web app so you can see what the user does in your app, what "pages" he visited etc.
Kinda like Google Analytics with statistics for a lot of things.
Google Analytics is great for this. Check out custom events: http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
It takes a fair amount more work than the "set it and forget it" type tracking you can do with traditional websites, but it's also pretty easy.
It will not 'just work', you need to be calling trackPageView to make the requests count as pageviews and include all the visitor information that would be included (not trackEvent). This gist is an old but popular solution to ajax navigation showing how to call trackPageView. It is called right after the content from the new url is injected into the page, so an equivalent in a framework like Backbone.js would on view initialization, like suggested in this guide.
Perhaps you can help me here: To use the Facebook JS Api, you need an App ID. So I created an application, used the App ID for a likebox on my website. Now it seems that when people click on like, they like the app and not my website ... now does someone know what to do if you want a Likebox for the website, and not for the app?
Have I screwed up? I don't think I can convert the app to a facebook page (a fb "page" ist the right way to go here, isn't it?), can I?
Thanks for the help.
To like a website rather than a page, you need to use the 'Like' widget.
This has a little more info for you and will generate the iframe code to add to your site too:
http://developers.facebook.com/docs/reference/plugins/like
Hope that helps!