Waqf (وقف/ endowment) means putting aside the original property and donating its benefits for the sake of Allaah. What is meant by the original property is something from which benefit may be derived whilst its essence remains, such as houses, shops, gardens, etc. What is meant by benefits is beneficial produce that comes from the original property, such as crops, rents, provision of shelter, etc. 
In Shariah, endowment or waqf refers to retention of any property that can be benefitted from, by suspending disposal of it, and dedicating its revenues to public use as act of charity. Houses, shops, gardens and the like, can be examples of property endowment, whose benefits (such as fruits, rents and lodging) can be given in charity.
Endowment is desirable in Islam, and it is considered a pious act that brings man near to Allah, as proved through the authentic sunnah. 
1. Umar said to the Prophet ﷺ, “O Messenger of Allah ﷺ, I have a land in Khaybar which I prize highly, so what do you order me to do with it?” The Prophet ﷺsaid “If you like, you can give the land aswaqf and give its fruits in charity.” Thereupon Umar gave it in charity (endowment on the condition) that the land and trees will neither be sold nor given as a present, nor bequeathed. He endowed it for the poor, for his kith and kin, for emancipation of slaves, for the Cause of Allah, for travelers and for guests. Sahih Al Bukhari 2737, Sahih Muslim 4200
2. Jabir (R) said, “All of the rich of the Prophet’s ﷺcompanions gave endowments.”
The Donor of a Waqf must be legally qualified to manage his own property. This means that he must be a free, adult and sane person. Thus a child, a foolish or weak minded person, or a slave is not legally qualified to grand a Waqf. 
A Waqf can be established through the following two ways:
1. Verbal Indication of waqf, such as saying, “I endow this place”, or saying, “I endow this place to be used as a mosque”. It is of two kinds:
a. Direct statement: such as saying, “I endowed such property,” or saying “I grant such and such property as a Waqf in the cause of Allah and the like. These are direct statements that have only the meaning of granting endowments. When a owner just utters such words, his waqf becomes valid (if it meets the necessary conditions), and he does not need to say any other formulas to confirm the endowment.
b. Metonymy: here it means saying metonymic words that can have meanings other than Waqf, such as saying, “I give such and such property in charity”, “I give such and such property to be used forever” or the like. When a donor uses such words, he must have the intention of granting a Waqf, or use some direct statements side by side with such metonymic words to clarify them.
2. Actions that indicate endowment, according to common convention, such as turning one’s house into a mosque and giving permission for people to perform -prayers therein, or turning one’s land into a cemetery and permitting people to bury dead persons therein.
1. The Donor must be legally qualified to manage his own property, as mentioned above.
2. The endowment object must be an identified article which is constantly utilizable and non-consumable, unlike food and the like.
3. The endowed object must be specified. It is invalid to grant unspecified endowments, it is invalid, for example to say, “I endow one of my houses,” without specifying it.
4. The endowment must be for something beneficial, for it is a means of getting nearer to Allah, such as mosques, barrages, etc. Another example of endowments for use is endowing something to support kith and kin. Accordingly, and endowment is invalid to be made for temples, for books of disbelief and atheism, or for lighting of graves, etc. This is because such endowments are regarded as means of assisting others in disobedience, polytheism and disbelief.
5. If the endowment is made for a certain person, that person must be one whose ownership is legally considered valid, because a Waqf is a kind of ownership that is not valid for those who cannot possess properties, such as a dead or an animal.
6. A Waqf must be fulfilled once it is made, it is invalid to be temporary or suspended except in case it is a condition for it to be given on the donor’s death. For example, it is valid for a donor of a Waqf to say, “When I die, my house will be a Waqf for the poor”.
Among the rulings on waqfs is that it is obligatory to act in accordance with the wishes of the one who set up the waqf, so long as it does not go against sharee’ah, because the Prophet ﷺsaid: “The Muslims are bound by their conditions, except for conditions which make haraam things permissible or halaal things forbidden.” And because ‘Umar (may Allaah be pleased with him) set up a waqf and stipulated certain conditions, and if it had not been obligatory to adhere to the conditions there would have been no point in stipulating them. So if (the person setting up the waqf) stipulates a certain amount, or that some deserving people should be given precedence over others, or that those who are to benefit should have certain qualities or be free of certain qualities, etc., then it should be done in accordance with his conditions, so long as that does not go against the Qur’aan or Sunnah.
If no guardian is stipulated by the donor to take care of the endowment or if the appointed guardian dies, the endowment must supervised by those to whom the endowment is donated if they are specified persons. If the endowment is granted to an association like a mosques, or for unspecified people or unlimited number of people such as the needy or the poor in general, the authorities are responsible to take care of the endowment or, at least, to appoint someone to do so.
If a person sets up a waqf for his children, he must treat males and females equally, because he has included all of them in that, which implies that they all have an equal share. Just as if he were to give something to them, it should be shared equally among them, so too if he sets up a waqf for them, they should have equal shares. After his own children, the waqf should pass to the children of his sons, and not the children of his daughters, because they belong to another man and should be attributed to their father, because they are not included in the aayah (interpretation of the meaning): “Allaah commands you as regards your children’s (inheritance):” al-Nisaa’ 4:11.
Some of the scholars think that they (daughter’s children) are included in the word “children”, because the daughters are also his children, so their (daughter’s) children are also his children in a real sense. And Allaah knows best.
If he says “I set up a waqf for my sons, or for the sons of So and so,” then the waqf is for the males only, because the word sons is used in the specific sense, as Allaah says (interpretation of the meaning): “Or has He (Allaah) only daughters and you have sons?”al-Toor 52:39
Unless those for whom the waqf is set up are a tribe, such as Bani Haashim or Bani Tameem, in which case the women are also included, because the name of the tribe includes both the males and the females.
But if the waqf is set up for a group who can be counted, they must all be included and treated equally. If they cannot all benefit from it because they are so many, such as Bani Haashim and Bani Tameem, then they do not all have to be included, because it is impossible, and it is permitted to limit it to some of them and give precedence to some of them over others.
A Waqf is one of the binding commitments that become obligatory to fulfill once they are made. Hence, it is impermissible to cancel it, for the Prophet ﷺsaid: “the land and trees (of a Waqf) will neither be sold or given as a present, nor bequeathed”. Sahih Al Bukhari 2764
It is impermissible to cancel a Waqf, as it is legally considered an eternal contract. Moreover, a Waqf can neither be sold nor transferred from its place unless its benefits completely vanish. For example, when the endowment house collapses and the profit it makes cannot afford it repair, or when the endowed agricultural land becomes infertile and its yield cannot afford its reclamation, it is permissible in such cases to sell the endowed object and use its price to get is like, for this best serves the objective of its granter. However, if the value, of the sold endowed property cannot afford an equal substitute, the price is to be spent to get a similar one even if of less value. Thus the new property, will be regarded as a Waqf once it is bought. 
Waqf means freezing the capital or property, and not disposing of it by selling, giving or inheriting, or in any other way, so that any income or earnings are to be disposed of in the manner dictated by the person who initiated the waqf, for charitable purposes and the like.
A gift or bequest means giving up possession of some wealth to someone who will benefit from it and who has full power of disposal over it.
In the case of waqf, the best is to use it for charitable purposes. If it is used for the purpose of calling non-Muslims to Islam, if there is the hope that they will enter Islam and it is most likely that they will do so, there is nothing wrong with that, because if the obligatory zakaah money may be used to soften people’s hearts towards Islam, then it is more apt that the money derived from waqf should be used for this purpose. But it is better to use it in charitable projects, because the benefit from them is certain rather than merely hoped for.
Waqf may be used to energize the Islamic economic system, so that waqf funds may be disposed of in ways that are permitted by sharee’ah in order to promote the growth of the Islamic economic system.
Any problems that may be expected with regard to waqf come from the heirs and relatives, and the way in which the profits should be distributed among the needy.
According to Islamic sharee‘ah, the waqf must have two components: the original, tangible property and the benefit.
Moreover, The waqf is when an owner who has full ownership of property allocates the benefits of his property (to charitable causes) whilst the original, tangible property remains his.
Thus it is clear that dedicating an account on Facebook or Twitter or other social media does not come under the heading of a waqf. Rather it is regarded as a type of charity that brings reward so long as the benefits continue, if there is any shar‘i benefit in it for others.
It is an ongoing charity in the linguistic sense, but not in the technical shar‘i sense. That is because a subscriber to a social media website does not own the page or the account that he has; rather he is using the benefit of that account. In fact the account itself is a benefit that does not have any tangible essence. The tangible property in this case is the huge server that contains the social media websites, and these servers are owned by the company, not the account holders. Hence it is not a waqf. 
Allah knows best
 Summary of Islamic Jurisprudence, Volume 2, Shaykh Salih Al Fawzaan