Hi Happy New Year and thanks in advance for your time..
So im using Facebook javascript SDK to display my FB page on my site. Its showing up as expected. Good.
Now I want to alter the Fb page title after it has loaded in my site. I tried getElementByClassName in javascript. But no effect(may be because of iframe?). This is the actual pic
And this is what i desire -- the fb page plug-in title has been changed.
Is it possible to achive this??
No, it is not possible.
The iframe content is from a different domain, and therefor the Same Origin Policy prevents you from accessing its content via JavaScript from your site.
Finally found a work around for the requirement. It is not possible to modify the page Pugin but -
use php sdk to initialise Facebook and
Use open graph to fetch the posts.
Now you can use this data as you like
By this method even individual posts can be tailored accordingly.
A working example is at -
http://callmenick.com/post/displaying-a-custom-facebook-page-feed
Related
so i have kind of a strange problem, I am in the process of building my own tweet button which is simple enough just using a link that resembles this <a href="https://twitter.com/intent/tweet?text=YOUR-TITLE&url=YOUR-URL&via=TWITTER-HANDLE">
now this as a link works just fine even with the dumby data prvided the problem is i would really like this page to open in an iframe on my site.. but twitter and other social networks have disabled this capability I am woundering if anyone know's a way i can use some sort of iframe or other tech including I assume an oauth and api which will alow me to send write, and display a tweet that the user can send inside my sight ?
as just using this returns an empty frame
<iframe src="http://twitter.com/intent/tweet?text=YOUR-TITLE&url=YOUR-URL&via=TWITTER-HANDLE">
</iframe>
anyhelp on how or even if I can do this or even a site I can check out that allows me as a user to do this would be greatly appreciated
(just a note I dont wish to tweet on a user behalf but rather display a pre defined text's tweet that enable the user to send without leaving my site or opening a new window )
Seems like it's against their terms of service. I'm researching the same issue now and it looks like you need to setup 0Auth to get an access token and then use the API. I'll report back when I have the full answer.
I have an injection on my website. When javascript is enabled the website redirects to another one.
How can I find out where the injection is?
Disable Javascript
Look at page source
Search for redirects
Another thing is that redirect can ge added to the site using Javascript. Maybe some content that you load using Javascript which won't be visible with Javascript disabled.
P.S. Quickest way I think would be by searching for the website you get redirected to in the page source.
If you cannot find any javascript redirects in your code check for any and all ajax requests. A script maybe injected asynchronously
Im loading the content of my sites via ajax&jquery into a area of the "main" page, so loading goes faster. but the problem is that with that method im getting serious SEO problems, because the URL is not getting updated. and search engines only index the homepage not all the other content too. So how can i update the URL of the site everytime when im loading new content? How can i let the page load the content needed when a updated URL is given?
you can view the whole sourcecode here: http://boxcomp.111mb.de/luxus/html8
can you maybe directly suggest me what i should add to existing jquery code? you can find it on top of the index.html file.
sorry for the "mess"
thank you very much!
All current browsers, including IE10+, do support HTML5 History API that allows to alter URL address without reloading page. For older browsers, you can just not use Ajax.
Search engines should not be affected by Ajax at all. They should see regular static links with regular href attributes.
I have to disappoint you.
You can't change the browser's url without reloading the page.
The only thing you can do is add anchors to the page:
index.html -> index.html#page1
But I think, these are not really relevant for search engines.
So you have to decide: either SEO or Ajax - but both is not possible...
I'm currently working on a website which requires a twitter plugin so I used the plugin creator on the twitter website to create a plugin and simply copy an pasted the code into a page.
It works fine when I upload the page and plugin to my own webspace however it doesn't when I upload it to the clients webspace.
Please take a look:
http://www.biguppower.com/test.html
http://s438332955.websitehome.co.uk/test.html
Has anyone got any ideas on why this could be.
Thanks, Sami.
I took a look to the console and this is written :
You have not whitelisted this domain for your Twitter widget. Go to
https://twitter.com/settings/widgets/260161750970793984/edit and add
'www.biguppower.com' to the 'Domains' list for this timeline.
I think that should do the trick.
Here's the thing.
Recently I've tried to add FB like button to some website I'm administrating and that was easy, but now I have a request I don't know how to handle.
The thing is, when you like some website, on your FB wall is posted a link (and some other stuff maybe) to that website, its by default and I know I can change that.
What I need is this, on my page I have a (html)div that is loaded dinamycally with some important data and I need to post that particular data on my FB wall.
I tried using javascript and open graph meta tags but it seems to me that these meta tags cannot be changed dinamycally.
If anyone has an idea how to do this, feedback is more than welcome.
Sincerely,
Milos
No, you technically cannot do this.
When you share a link on Facebook, Facebook servers visits the URL specified on sharing, collents META information and displays those.
However, Javascript runs after content is loaded and on browsers, and I don't think Facebook servers run javascripts before getting META information.
Therefore, even if you change Open graph meta tags dynamically, FB still uses old tags (which is set on initial page load).
You should figure out a way to set content before sending HTML to client.
I found a solution to this issue. This can be done using iframe to integrate FB like button. Piece of infrormation you need to do this can be found here.
It shows the FB like button and you can add your url in without having to mess up with meta tags