I'm trying to make a Facebook application that utilises the multi-friend-selector to let someone answer a question. (eg: why do you think is the most awesome? you get multi friend selector below, choose someone and click post to his wall).
I've the post to wall part working fine using PHP. Right now though the friend to be asked a question is picked randomly.
Now the question. Is there a way to use PHP to render a multi-friend-selector or do i HAVE to go back and do this whole thing using Javascript?
The multi-friend-selector is under Facebook's control and you cannot use for anything other than sending invitations. So unfortunately you'd have to use your own. Fortunately though, someone else already had this problem and wrote one for you: Facebook – Friends selection custom component. Note that it does use some JavaScript.
Related
New iOS developer here. I'm looking to build an app that uses a Wordpress database to populate a news feed, and I've found a good amount of info about grabbing posts from Wordpress but nothing about posting FROM the app TO the database. I know that the code can't be written here, but I was hoping someone knew where I could find how to do this or point me in the right direction. I planned on writing all of my new code in Swift also. Thanks in advance for any advice!
The easiest way to interact with Wordpress is by activating the jetpack api. You can then do almost anything you want. See the full documentation here: https://developer.wordpress.com/docs/api/
Reading data is easy. you only have to call the correct URL. If you wan to see a sample (written in swift) then have a look at:
https://github.com/evermeer/AlamofireJsonToObjects/blob/master/AlamofireJsonToObjectsTests/WordpressTest.swift
If you want to make updates, then you need to use Oauth2. Here are some libraries that could help with that: https://cocoapods.org/?q=oauth
I want to have a forum like thing on my website.I dont want any complicated thing, just the user must be able to post questions and the administrator(that is me) can answer them..(It would be nice if it has tree like structure but even without that it is fine) ..All the users can read the questions on the forum anytime(obvious) ..I dont want to put phpbb3 or any such readymade tool..I just want to be it simple (something like this scroll to the bottom) ..How to get this thing done..If possible in php please tell that..Otherwise tell other options..Please help me out..
You could probably do something like this in WordPress. (Your local webserver would need to be running MySQL as well as PHP to achieve this.) At the simplest level you could set up a page and allow user comments on it.
A really simple way is just to have a basic form with text-input, textarea, and submit button. Then have the person input their name, question, and submit it. Make sure you validate the form with js and/or php. Then update a password protected page that only you can access with the name and question. Then using whatever cms you have for this page (or just static html if you have the patience) you can just update the front page with the new question and answer above the form.
The best way, though, is going to be some kind of "readymade" system that you tweak...
I'm building a website and am looking for a way to implement a certain feature that Facebook has. The feature that am looking for is the link inspector. I am not sure that is what it is called, or what its called for that matter. It's best I give you an example so you know exactly what I am looking for.
When you post a link on Facebook, for example a link to a youtube video (or any other website for that matter), Facebook automatically inspects the page that it leads you and imports information like page title, favicon, and some other images, and then adds them to your post as a way of giving (what i think is) a brief preview of the page to anyone reading that post.
I already have a feature that allows users to share a link (or URLs). What I want is to do something useful with the url, to display something other than just a plain link to a webpage, to give someone viewing a shared link (in the form if a post) some useful insight into the page that the url leads to.
What I'm looking for is a script, or tutorial, or at the very least someone to point me in the right direction, so that it can help me accomplish this (using PHP preferably).
I've tried googling it but I don't know exactly what such a feature would be called and google isn't helpful when you don't exactly know what you're looking for.
I figure someone out there, in this vast knowledge basket called stackoverflow, can help me with this. Can anyone help me?
You would first scan the page for URLs using regex, then you would parse the pages those links reference with a php DOMDocument. You could use the parsed document to obtain any information you need from the webpage.
DOMDocument:
http://php.net/manual/en/class.domdocument.php
DOMDocument->load (loads a file, aka a webpage):
http://php.net/manual/en/domdocument.load.php
the link goes through http://www.facebook.com/l.php
You pass a URL to this and facebook filters it.
I tried to read Twitter API but I'm a newbie and I found it really difficult. What I'd like to acheive is "simple": a news bar to add on my site showing messages I post on my Twitter account, with the date I posted them, like: "08/26 Text | 08/25 Text" and so on. The default ones are too big and with too many informations, I just need a very simple text-only one. Can someone please help?
Something simple like this can probably be done more easily by using the users timeline feed, such as http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=username
I have a super simple example that uses the following and displays it using an AJAX news-scroller type effect over on GitHub. Feel free to use it and modify it as you see fit.
I think you may be looking for this effect
http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html
You also might want to check this simple to integrate Twitter jQuery library
http://tweet.seaofclouds.com/
. . . let me know if you need more help to get started
How to make a basic Forum Thread on my website ?
Like they click it shows the thread without going to a new page and what not.
EDIT*** Like the user he clicks something that says Thread or a Programming* and it shows all the posts and they may view that post as if it were on a whole new page without the Programming and thread just the post.
You wont be able to do this PHP only...
You can do this with JavaScript though I prefer JQuery as it makes dealing with JavaScript easier. This is a great tutorial on getting started with JQuery which covers show/hide effects (which is what you want to look at to achieve the functionality you've described.)
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
Good Luck!